PluginToolbarButton¶
A button on a PluginToolbar in the Studio ribbon, created by PluginToolbar.CreateButton(), that fires Click when pressed.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
Description¶
A PluginToolbarButton object is created through the
PluginToolbar.CreateButton() function. It allows the user to initiate
a single, one-off action in Roblox Studio through the
Click event. Toolbar buttons can also be
assigned a keyboard shortcut through Studio's File ⟩ Customize
Shortcuts window.
When pressed, the Click event fires. A button will also remain in the pressed state, which may be set manually using SetActive(). Upon plugin activation (Plugin.Activate()), buttons in all other PluginToolbars will be toggled off. If all buttons in a toolbar are off, the toolbar's plugin is deactivated (Plugin.Deactivate()).
When the game viewport is not visible, buttons will be disabled as if their Enabled property were false. Disabled buttons are desaturated and do not respond to user clicks. By setting ClickableWhenViewportHidden to true, you can allow plugin buttons to remain clickable, such as during script editing.
Inheritance¶
Object → Instance → PluginToolbarButton
Properties¶
| Member | Signature | Summary |
|---|---|---|
ClickableWhenViewportHidden |
ClickableWhenViewportHidden: bool |
Determines whether the button can be clicked when the 3D viewport is hidden, such as when a Script is being edited in another tab. |
Enabled |
Enabled: bool |
Determines whether the button is clickable in general. |
Icon |
Icon: ContentId |
Determines what icon should represent the button. |
IconContent |
IconContent: Content |
The content of the image used as the button's icon in the toolbar. Only supports asset URIs. |
Methods¶
| Member | Signature | Summary |
|---|---|---|
SetActive |
PluginToolbarButton:SetActive(active: bool): null |
Sets the state of the plugin button. |
SetDropdownActive |
PluginToolbarButton:SetDropdownActive(active: bool): null |
— |
Events¶
| Member | Signature | Summary |
|---|---|---|
Click |
Click() |
Fires when the user presses and releases their cursor on the button. |
DropdownClick |
DropdownClick() |
— |
Roblox reference: PluginToolbarButton
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.