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

Commit 8bf91d0

Browse files
committed
Revert changes
1 parent 52adc61 commit 8bf91d0

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

src/SignsInternal/PluginGui/init.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function PluginGui:newPluginGui(widgetGui)
4343
createFrame:GetFrame().Parent = createScrollFrame:GetContentsFrame()
4444

4545
tabBar:AddTab("CreateScrollFrame", "Create")
46+
createScalingFrame:GetFrame().Parent = tabBar:GetFrame() -- set the section parent
4647

4748
-- Top padding
4849
local padding = Instance.new("Frame")
@@ -480,8 +481,6 @@ function PluginGui:newPluginGui(widgetGui)
480481
GuiObjectPart.new(label, localize, influence, top, size)
481482
end)
482483

483-
-- TODO: Rewrite tab thingy so this doesn't error or smth.
484-
485484
-- -- Edit tab
486485

487486
-- local editScrollFrame = VerticalScrollingFrameScrollingFrame.new("EditScrollFrame")

src/SignsInternal/StudioWidgets/HorizontalTabBar.lua

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ end
5858

5959
function HorizontalTabClass:_SetupTabHandling(self)
6060
print(self._titlebar.Name)
61-
-- self._titlebar.ChildAdded:Connect(function()
62-
-- local tabButtonWidth = 1 / (#self._titlebar:GetChildren() - 1)
63-
-- for _, child in pairs(self._titlebar:GetChildren()) do
64-
-- if child:IsA("TextButton") then
65-
-- child.Size = UDim2.new(tabButtonWidth, 0, 0, 27)
66-
-- end
67-
-- end
68-
-- end)
69-
-- self._titlebar.ChildRemoved:Connect(function()
70-
-- local tabButtonWidth = 1 / (#self._titlebar:GetChildren() - 1)
71-
-- for _, child in pairs(self._titlebar:GetChildren()) do
72-
-- if child:IsA("TextButton") then
73-
-- child.Size = UDim2.new(tabButtonWidth, 0, 0, 27)
74-
-- end
75-
-- end
76-
-- end)
61+
self._titlebar.ChildAdded:Connect(function()
62+
local tabButtonWidth = 1 / (#self._titlebar:GetChildren() - 1)
63+
for _, child in pairs(self._titlebar:GetChildren()) do
64+
if child:IsA("TextButton") then
65+
child.Size = UDim2.new(tabButtonWidth, 0, 0, 27)
66+
end
67+
end
68+
end)
69+
self._titlebar.ChildRemoved:Connect(function()
70+
local tabButtonWidth = 1 / (#self._titlebar:GetChildren() - 1)
71+
for _, child in pairs(self._titlebar:GetChildren()) do
72+
if child:IsA("TextButton") then
73+
child.Size = UDim2.new(tabButtonWidth, 0, 0, 27)
74+
end
75+
end
76+
end)
7777
end
7878

7979
function HorizontalTabClass:_SetupMouseClickHandling()
@@ -121,12 +121,12 @@ function HorizontalTabClass:AddTab(suffix: string, name: string)
121121
tabButton.TextSize = GuiUtilities.kDefaultFontSize
122122
tabButton.Text = name
123123
tabButton.Parent = self._titlebar
124-
-- GuiUtilities.syncGuiElementFontColor(tabButton)
125-
-- GuiUtilities.syncGuiElementTitlebarColor(tabButton)
126-
-- GuiUtilities.syncGuiElementBorderColor(tabButton)
124+
GuiUtilities.syncGuiElementFontColor(tabButton)
125+
GuiUtilities.syncGuiElementTitlebarColor(tabButton)
126+
GuiUtilities.syncGuiElementBorderColor(tabButton)
127127

128128
tabButton.MouseButton1Down:Connect(function()
129-
-- self._uiPageLayout:JumpTo(self:GetContentsFrame(suffix))
129+
self._uiPageLayout:JumpTo(self:GetContentsFrame(suffix))
130130
end)
131131
end
132132

@@ -135,7 +135,11 @@ function HorizontalTabClass:GetTitlebar(): Frame
135135
end
136136

137137
function HorizontalTabClass:GetContentsFrame(suffix: string): Frame
138-
return self._frame:FindFirstChild("VerticalScrollFrame" .. suffix)
138+
for _, child in pairs(self._frame:GetChildren()) do
139+
if child.Name == "VFrame" .. suffix then
140+
return child
141+
end
142+
end
139143
end
140144

141145
function HorizontalTabClass:GetFrame(): Frame

src/SignsInternal/StudioWidgets/VerticalScrollingFrame.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function VerticalScrollingFrame.new(suffix: string)
2727
section.Size = UDim2.new(1, 0, 1, 0)
2828
section.Position = UDim2.new(0, 0, 0, 0)
2929
section.BackgroundTransparency = 0
30-
section.Name = "VerticalScrollFrame" .. suffix
30+
section.Name = "VFrame" .. suffix
3131
GuiUtilities.syncGuiElementBackgroundColor(section)
3232
self._section = section
3333

0 commit comments

Comments
 (0)