Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Commit d82fc37

Browse files
committed
Updated sizing parameters & cleaned code.
1 parent 0263de9 commit d82fc37

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/SignsInternal/PluginInfo/PluginToolbar.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
local PluginGuiService = game:GetService("PluginGuiService")
22

3+
-- Find the PluginToolbar class, or create it if it doesn't exist
34
local PluginToolbars = PluginGuiService:FindFirstChild("PluginToolbars")
45
if PluginToolbars == nil then
56
PluginToolbars = Instance.new("Folder")
6-
PluginToolbars.Archivable = false -- Prevent it from being included when saving the game or publishing it to roblox
7+
PluginToolbars.Archivable = false -- Don't want to save this to the place file
78
PluginToolbars.Name = "PluginToolbars"
89
PluginToolbars.Parent = PluginGuiService
910
end
1011

1112
local PluginToolbar = {}
12-
local plugin = nil -- Unfortunately, even if this module is require()'d in a plugin context, this does not exist.
13+
local plugin = nil -- Unfortunately, even if this module is require()'d in a plugin context, this does not exist
1314

15+
-- Creates a new toolbar with the given name
1416
local function CreateNewToolbar(name)
1517
local toolbar = plugin:CreateToolbar(name)
1618
toolbar.Name = name
1719
toolbar.Parent = PluginToolbars
1820
return toolbar
1921
end
2022

23+
-- Creates a new button on the given toolbar
2124
function PluginToolbar:CreateToolbar(name)
2225
assert(typeof(name) == "string", "Incorrect parameter type for param 'name' (expected string, got " .. typeof(name) .. ")")
2326
assert(#name > 0, "Cannot have zero-length toolbar name.")

src/SignsInternal/PluginInfo/init.client.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ local widgetInfo = DockWidgetPluginGuiInfo.new(
33
Enum.InitialDockState.Left, -- Widget will be initialized in left panel
44
false, -- Widget will be initially enabled
55
false, -- Don't override the previous enabled state
6-
300, -- Default width of the floating window
7-
447, -- Default height of the floating window
8-
280, -- Minimum width of the floating window
9-
373 -- Minimum height of the floating window
6+
275, -- Default width of the floating window
7+
655, -- Default height of the floating window
8+
165, -- Minimum width of the floating window
9+
415 -- Minimum height of the floating window
1010
)
1111

12-
-- Require plugin toolbar
12+
-- Require plugin toolbar so other plugins can share toolbar
1313
local pluginToolbar = require(script.PluginToolbar)
1414
pluginToolbar:SetPlugin(plugin)
1515

0 commit comments

Comments
 (0)