Class
PluginMenu
NotCreatableNotReplicated
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#
Iconstring | The icon to be displayed when used as a submenu.ReadSafeNotReplicated |
Titlestring | The text to be displayed when used as a submenu.ReadSafeNotReplicated |
Visibleboolean | Determines 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#
| AddAction | Adds the given action to the menu.PluginSecurity security |
| AddMenu | Adds the given menu as a separator.PluginSecurity security |
| AddNewAction | Creates a temporary action that is hidden from Studio's customize shortcuts window.PluginSecurity security |
| AddSeparator | Adds a separator between items in the menu.PluginSecurity security |
| Clear | Clears the menu.PluginSecurity security |
| ShowAsync | Shows 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.
| Name | Type | Default | Description |
|---|---|---|---|
action | Instance | The action to add. |
Returns
()
AddMenu(menu: Instance): ()#
PluginSecurity security
Adds the given menu as a separator.
| Name | Type | Default | Description |
|---|---|---|---|
menu | Instance | The 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.
| Name | Type | Default | Description |
|---|---|---|---|
actionId | string | Must be a unique string that identifies this PluginAction from
others. | |
text | string | The text to be displayed. | |
icon | string | The icon to be displayed. |
Returns
Instance— The createdPluginAction.
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
Instance— ThePluginActionitem that was selected ornil.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild