More control over Toolbars and Buttons in the Plugin Lua API

The Lua Plugin feature for Roblox Studio is currently a bit primitive and limiting in what you can do with Toolbars and Buttons:

  • Once a Button/Toolbar is created, it cannot be removed or hidden.
  • The display properties are set in stone.
    • You cannot change a Toolbar’s name label.
    • The title, description, and icon of a Button cannot be changed once created.
  • The active state of a Button is write only (via SetActive), you have to manually keep track of your button’s active state with a separate bool variable.

Thus, I would like to propose some new APIs for these classes:


bool Toolbar.Enabled

The enabled state of the Toolbar.
[ get / set ]


string Toolbar.DisplayName

The display name of the Toolbar.
[ get / set ]

;image


bool Button.Enabled

The visible state of the Button.
[ get / set ]


bool Button.Active

The toggled state of the Button.
[ get / set ]


string Button.Title

The displayed title of the Button.
[ get / set ]

image


string Button.Description

The displayed description of the Button.
[ get / set ]

image


Content Button.Icon

The displayed icon of the Button.
[ get / set ]
image


The main reason I’d like to have these features is so that I can collapse and expand a large set of plugin buttons, and describe the current status of these buttons more clearly. It would help me conserve space when I’m not using certain plugins, and ultimately provides more freedom in how we can design our plugins.


25 Likes

Support; it’d also be neat if the api could allow us to set our button’s order (and maybe also the ability to share a toolbar between plugins without doing anything too sketchy).

Toolbar:GetButtons() would be a cool API too. It would return objects with all of the said properties above.

2 Likes