Toolbar Unifier - An easy way to share toolbar space in plugins

You know what’s annoying and very counter-intuitive for modular plugins? When two plugins create the same toolbar, it creates two categories with the same name. [size=1]But why?[/size]

In light of this issue, I have taken the liberty of designing a ModuleScript that creates common plugin toolbar references. The methodology is incredibly simple and simply places a folder in PluginGuiService to contain the PluginToolbar instances of all plugins that use the module.

You can get the module here: ToolbarUnification - Roblox

Implementation is virtually identical to that of a stock plugin, with the addition of one extra line.

local ToolbarUnification = require(the_script)
ToolbarUnification:SetPluginRef(plugin)
-- ^ This is required because modules required by plugins can't access the 
--   plugin variable.
ToolbarUnification:CreateToolbar("Toolbar Name") 
-- ^ This toolbar is shared across all plugins that use this module and create
--   a toolbar with the same name.

[size=2]n.b. SetPluginRef returns a reference to self so it is possible to do local ToolbarUnification = require(the_script):SetPluginRef(plugin) in-line like that if you want to.[/size]

If you’re someone like me who designs individual tools as part of a toolkit where the tools don’t really have any particular theme to them, thus warranting that they are not all packaged together, and want all of your plugins under the same toolbar name, then this is your ticket to doing just that!

14 Likes