Reference API Roblox

Engine API

Website

Related

Reference API Roblox

PluginToolbarButton

This class is not creatable. Instances of this class cannot be created with Instance.new.
Tags: [NotCreatable]

Member index 7

HistoryMember
553ClickableWhenViewportHidden: bool
553Enabled: bool
645Icon: ContentId
573SetActive(active: bool): null
630SetDropdownActive(active: bool): null
462Click()
589DropdownClick()
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

A PluginToolbarButton is an object created by the PluginToolbar:CreateButton() function. It allows the user to initiate a single, one-off action in Roblox Studio through the Click event.

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).

History 21

Members 7

Click

Parameters (0)
No parameters.

Click fires when the PluginToolbarButton is pressed and released by the user.

Clicking a PluginToolbarButton causes the state of the button to toggle. Call SetActive to manually set the state of the button.

History 2

ClickableWhenViewportHidden

TypeDefault
bool

ClickableWhenViewportHidden determines whether a PluginToolbarButton may be clicked while the game viewport is hidden, such as when a Script is being edited in another tab.

Typically, this property is good to enable if an action triggered by a plugin button's Click event doesn't occur in the game world (Workspace). For example, a button that opens a widget should have this property be true, as showing a widget is visible to the user even if the game view isn't visible.

This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

DropdownClick

Parameters (0)
No parameters.

History 1

Enabled

TypeDefault
bool

Enabled determines whether a button is clickable in general. When this property is false, the button will be greyed out and unclickable, preventing the user from firing the Click event. Buttons are enabled by default.

When re-enabling this property, the plugin button's state won't be remembered from the previous state in which the user left the button in. Instead, it will default to the last state set by SetActive() or to the inactive state if SetActive() was never used.

Plugins should disable their buttons when the button action isn't relevant in the current context. For example, a plugin button that assigns random colors to selected should not be enabled when the selection contains no parts. See the code samples for more information.

See also:

This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

Icon

TypeDefault
ContentId

Icon determines what icon should be shown for the button in the plugin toolbar. When this property is not set, the button will instead use the button's text given by PluginToolbar:CreateButton().

This property is not replicated. Its interface does not cross the network boundary.

History 5

Tags: [NotReplicated]

SetActive

Parameters (1)
activebool
Returns (1)
null

This method can be used to manually set the active state of the plugin button.

When the Enabled property is toggled back on, the button will either revert to the last state set by this method or default to inactive if this method hasn't been used previously.

History 3

SetDropdownActive

Parameters (1)
activebool
Returns (1)
null

History 1

Settings