Roblox UtilitiesDevlHub Roblox Documentation

Class

PluginMenu

NotCreatableNotReplicated
Inherits
Instance › Object
Memory category
Instances

A context menu that can be shown in Studio. Displays a list of PluginActions and supports submenus.

PluginMenu represents a context menu which can be shown in Studio to display a list of PluginActions and which also supports submenus. A PluginMenu must be created using the Plugin:CreatePluginMenu() method in order to work as expected.

Properties 3#

IconstringThe icon to be displayed when used as a submenu.ReadSafeNotReplicated
TitlestringThe text to be displayed when used as a submenu.ReadSafeNotReplicated
VisiblebooleanDetermines whether the menu is shown when it is used as a submenu.Read: RobloxScriptSecurityWrite: RobloxScriptSecurityReadSafe

Icon: string#

NotReplicatedReadSafe

This property determines the icon to be displayed when used as a submenu. It defaults to an empty string "".

Title: string#

NotReplicatedReadSafe

This property determines the text to be displayed when a PluginMenu is used as a submenu. It defaults to an empty string "".

Visible: boolean#

Read: RobloxScriptSecurityWrite: RobloxScriptSecurityReadSafe

This property determines whether a PluginMenu is shown when it is displayed as a submenu of another menu, that is, when it has been added to a parent menu through PluginMenu:AddMenu(). It defaults to true; setting it to false hides the submenu's entry in its parent menu.

Methods 6#

AddActionAdds the given action to the menu.PluginSecurity security
AddMenuAdds the given menu as a separator.PluginSecurity security
AddNewActionCreates a temporary action that is hidden from Studio's customize shortcuts window.PluginSecurity security
AddSeparatorAdds a separator between items in the menu.PluginSecurity security
ClearClears the menu.PluginSecurity security
ShowAsyncShows the menu at the mouse cursor. Yields until either an item is selected or the menu is closed.PluginSecurity securityYields

AddAction(action: Instance): ()#

PluginSecurity security

Adds the given action to the menu.

NameTypeDefaultDescription
actionInstanceThe action to add.
Returns
  • ()

AddMenu(menu: Instance): ()#

PluginSecurity security

Adds the given menu as a separator.

NameTypeDefaultDescription
menuInstanceThe menu to add as a submenu. Uses its Title and Icon to display.
Returns
  • ()

AddNewAction(actionId: string, text: string, icon: string): Instance#

PluginSecurity security

Creates a temporary action that is hidden from Studio's File ⟩ Customize Shortcuts window.

NameTypeDefaultDescription
actionIdstringMust be a unique string that identifies this PluginAction from others.
textstringThe text to be displayed.
iconstringThe icon to be displayed.
Returns

AddSeparator(): ()#

PluginSecurity security

Adds a separator between items in the menu.

Returns
  • ()

Clear(): ()#

PluginSecurity security

Clears the menu.

Returns
  • ()

ShowAsync(): Instance#

YieldsPluginSecurity security

Shows the menu at the mouse cursor. It yields until either an item is selected or the menu is closed. The selected action fires its PluginAction.Triggered event.

Returns

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed