Hey there! I am currently working on a plugin, but there is a small problem - when you click the X button on the plugin widget, it doesn’t de-select the icon on the topbar. Is there anyway to make this happen?
This is my code:
local toolbar = plugin:CreateToolbar("Tech Tunnel")
local pluginButton = toolbar:CreateButton("Open Menu", "This plugin allows you to create stages for Tech Tunnel!", "http://www.roblox.com/asset/?id=6777344784")
local open = false
local Info = DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Left,
false,
true,
375,
350,
375,
400
)
local widget = plugin:CreateDockWidgetPluginGui("Tech Tunnel Builder", Info)
widget.Title = "Tech Tunnel Builder"
local frame = script.Parent.MainFrame
frame.Parent = widget
pluginButton.Click:Connect(function()
widget.Enabled = not widget.Enabled
end)
local toolbar = plugin:CreateToolbar("Test")
local PluginToolbarButton = toolbar:CreateButton("Test","Hi","")
PluginToolbarButton:SetActive(false) -- Unhighlight the button
PluginToolbarButton:SetActive(true) -- highlight the button