PluginMenu
A context menu that can be shown in Studio. Displays a list of PluginActions and supports submenus.
Memory category | Instances |
---|
Member index 8
Description
A context menu that can be shown in Studio. Displays a list of PluginActions and supports submenus. PluginMenu must be created using the Plugin:CreatePluginMenu() method in order to work as expected.
See Also
- PluginAction, an object that represents a generic performable action
in Roblox Studio, with no directly associated
Toolbar
or Button. - Plugin:CreatePluginAction() which creates a PluginAction.
- PluginMenu.Title which is the text to be displayed when used as a submenu.
- PluginMenu.Icon which is the icon to be displayed when used as a submenu.
- PluginMenu:AddAction() which adds the given action to the menu.
- PluginMenu:AddNewAction() which creates a temporary action that is hidden from Studio's customize shortcuts window.
- PluginMenu:AddMenu() which adds the given menu as a separator.
- PluginMenu:AddSeparator() which adds a separator between items in the menu
- PluginMenu:Clear() which clears the menu.
- PluginMenu:ShowAsync() which shows the menu at the mouse cursor and yields until either an item is selected or the menu is closed.
History 25
- 573 Change ReturnType of Clear from void to null
- 573 Change ReturnType of AddSeparator from void to null
- 573 Change ReturnType of AddMenu from void to null
- 573 Change ReturnType of AddAction from void to null
- 553 Change Default of Title from to
- 553 Change Default of Icon from to
- 486 Change ThreadSafety of Title from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Icon from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ShowAsync from to Unsafe
- 462 Change ThreadSafety of Clear from to Unsafe
- 462 Change ThreadSafety of AddSeparator from to Unsafe
- 462 Change ThreadSafety of AddNewAction from to Unsafe
- 462 Change ThreadSafety of AddMenu from to Unsafe
- 462 Change ThreadSafety of AddAction from to Unsafe
- 462 Change ThreadSafety of Title from to ReadOnly
- 462 Change ThreadSafety of Icon from to ReadOnly
- 364 Add ShowAsync
- 364 Add Clear
- 364 Add AddSeparator
- 364 Add AddNewAction
- 364 Add AddMenu
- 364 Add AddAction
- 364 Add Title
- 364 Add Icon
- 364 Add PluginMenu
Members 8
AddAction
Parameters (1) | ||
---|---|---|
action | Instance | |
Returns (1) | ||
null |
Adds the given action to the menu.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
AddMenu
Parameters (1) | ||
---|---|---|
menu | Instance | |
Returns (1) | ||
null |
Adds the given menu as a separator.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
AddNewAction
Parameters (3) | Default | |
---|---|---|
actionId | string | |
text | string | |
icon | string | |
Returns (1) | ||
Instance |
Creates a temporary action that is hidden from Studio's customize shortcuts window.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of AddNewAction from to Unsafe
- 364 Add AddNewAction
AddSeparator
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Adds a separator between items in the menu.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of AddSeparator from void to null
- 462 Change ThreadSafety of AddSeparator from to Unsafe
- 364 Add AddSeparator
Clear
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Clears the menu.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
Icon
Type | Default | |
---|---|---|
string |
This property determines the icon to be displayed when used as a sub menu.
It defaults to an empty string ""
.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true/false |
ShowAsync
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instance |
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.
Security | PluginSecurity |
---|---|
Thread safety | Unsafe |
Title
Type | Default | |
---|---|---|
string |
This property determines the text to be displayed when a
PluginMenu is used as a sub menu. It defaults to an empty string
""
.
Thread safety | ReadSafe |
---|---|
Category | Appearance |
Loaded/Saved | true/false |