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

Commit 2bbf61f

Browse files
committed
Added new collapses.
1 parent b046e33 commit 2bbf61f

File tree

1 file changed

+22
-13
lines changed
  • src/Workspace/SignsInternal/PluginGui

1 file changed

+22
-13
lines changed

src/Workspace/SignsInternal/PluginGui/init.lua

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,41 +112,50 @@ function PluginGui:newPluginGui(widgetGui)
112112
false -- initially disabled?
113113
)
114114
wrappedCheckbox:GetFrame().Parent = textCollapse:GetContentsFrame()
115-
116-
local colorTextChoice = LabeledMultiChoice.new(
117-
"colorSelection", -- name suffix of gui object
118-
"Text Color", -- title text of the multi choice
119-
Color, -- choices array
120-
11 -- the starting index of the selection
115+
116+
local fontCollapse = CollapsibleTitledSection.new( -- Fonts collapse
117+
"fontCollapse", -- name suffix of the gui object
118+
"Font", -- the text displayed beside the collapsible arrow
119+
true, -- have the content frame auto-update its size?
120+
true, -- minimizable?
121+
true -- minimized by default?
121122
)
122-
if (GuiUtilities:ShouldUseIconsForDarkerBackgrounds()) then
123-
colorTextChoice:SetSelectedIndex(1)
124-
end
125-
colorTextChoice:GetFrame().Parent = textCollapse:GetContentsFrame()
123+
listFrame:AddChild(fontCollapse:GetSectionFrame()) -- add child to expanding VerticallyScalingListFrame
126124

127125
local boldCheckbox = LabeledCheckbox.new(
128126
"boldCheckbox", -- name suffix of gui object
129127
"Bold", -- text beside the checkbox
130128
false, -- initial value
131129
false -- initially disabled?
132130
)
133-
boldCheckbox:GetFrame().Parent = textCollapse:GetContentsFrame()
131+
boldCheckbox:GetFrame().Parent = fontCollapse:GetContentsFrame()
134132

135133
local italicCheckbox = LabeledCheckbox.new(
136134
"italicCheckbox", -- name suffix of gui object
137135
"Italic", -- text beside the checkbox
138136
false, -- initial value
139137
false -- initially disabled?
140138
)
141-
italicCheckbox:GetFrame().Parent = textCollapse:GetContentsFrame()
139+
italicCheckbox:GetFrame().Parent = fontCollapse:GetContentsFrame()
140+
141+
local colorTextChoice = LabeledMultiChoice.new(
142+
"colorSelection", -- name suffix of gui object
143+
"Text Color", -- title text of the multi choice
144+
Color, -- choices array
145+
11 -- the starting index of the selection
146+
)
147+
if (GuiUtilities:ShouldUseIconsForDarkerBackgrounds()) then
148+
colorTextChoice:SetSelectedIndex(1)
149+
end
150+
colorTextChoice:GetFrame().Parent = fontCollapse:GetContentsFrame()
142151

143152
local fontTextChoice = LabeledMultiChoice.new( -- Basically in beta thingy for fonts. New system prob done by another PluginGui soon. This will suffice.
144153
"fontTextChoice", -- name suffix of gui object
145154
"Font Face", -- title text of the multi choice
146155
FontFace, -- choices array
147156
32 -- the starting index of the selection
148157
)
149-
fontTextChoice:GetFrame().Parent = textCollapse:GetContentsFrame()
158+
fontTextChoice:GetFrame().Parent = fontCollapse:GetContentsFrame()
150159

151160
local alignmentCollapse = CollapsibleTitledSection.new( -- Fonts collapse
152161
"alignmentCollapse", -- name suffix of the gui object

0 commit comments

Comments
 (0)