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 ]
;
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 ]
string Button.Description
The displayed description of the Button.
[ get / set ]
Content Button.Icon
The displayed icon of the Button.
[ get / set ]
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.