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

Commit bdb95e1

Browse files
committed
Updated spec.
1 parent b912e3b commit bdb95e1

File tree

8 files changed

+34
-35
lines changed

8 files changed

+34
-35
lines changed

src/Workspace/SignsInternal/StudioWidgets/CollapsibleTitledSection.lua

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
116116
local titleTextOffset = self._titleBarHeight
117117

118118
local titleBar = Instance.new('ImageButton')
119-
if self._minimizable == true then
120-
titleBar.AutoButtonColor = false -- TODO: Set this to false when you implement a better solution.
121-
else
122-
titleBar.AutoButtonColor = false
123-
end
124119
titleBar.Name = 'TitleBarVisual'
125120
titleBar.Position = UDim2.new(0, 0, 0, 0)
126121
titleBar.Size = UDim2.new(1, 0, 0, self._titleBarHeight)
@@ -132,8 +127,8 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
132127
local titleLabel = Instance.new('TextLabel')
133128
titleLabel.Name = 'TitleLabel'
134129
titleLabel.BackgroundTransparency = 1
135-
titleLabel.Font = Enum.Font.SourceSansBold -- TODO: input spec font
136-
titleLabel.TextSize = 15 -- TODO: input spec font size
130+
titleLabel.Font = GuiUtilities.kStandardFontFaceBold
131+
titleLabel.TextSize = GuiUtilities.kStandardFontSize
137132
titleLabel.TextXAlignment = Enum.TextXAlignment.Left
138133
titleLabel.Text = titleText
139134
titleLabel.Position = UDim2.new(0, titleTextOffset, 0, 0)
@@ -160,12 +155,6 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
160155
settings().Studio.ThemeChanged:Connect(_UpdateMinimizeButtonTheme)
161156
_UpdateMinimizeButtonTheme()
162157

163-
-- self._minimizeButton.MouseButton1Down:Connect(function()
164-
-- self:_ToggleCollapsedState()
165-
-- end)
166-
-- self:_UpdateMinimizeButton()
167-
-- self._minimizeButton.Parent = titleBar
168-
169158
titleBar.InputBegan:Connect(function(input)
170159
if (input.UserInputType == Enum.UserInputType.MouseMovement) then
171160
self._hovered = true
@@ -185,7 +174,7 @@ function CollapsibleTitledSectionClass:_CreateTitleBar(titleText)
185174
self._clicked = true
186175
self:_updateButtonVisual()
187176

188-
if self._minimizable == true then -- if check was added in to fix bug. idk why this was left unfixed.
177+
if self._minimizable == true then
189178
self:_ToggleCollapsedState()
190179
end
191180
end)

src/Workspace/SignsInternal/StudioWidgets/CustomTextButton.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function CustomTextButtonClass.new(buttonName, labelText)
4343
label.Text = labelText
4444
label.BackgroundTransparency = 1
4545
label.Size = UDim2.new(1, 0, 1, 0) -- 1, 0, 1, GuiUtilities.kButtonVerticalFudge
46-
label.Font = Enum.Font.SourceSans
47-
label.TextSize = 15
46+
label.Font = GuiUtilities.kStandardFontFace
47+
label.TextSize = GuiUtilities.kStandardFontSize
4848
label.Parent = button
4949
GuiUtilities.syncGuiElementFontColor(label)
5050

src/Workspace/SignsInternal/StudioWidgets/CustomTextLabel.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function CustomTextLabelClass.new(nameSuffix, height)
2727
end
2828
label.BackgroundTransparency = 1
2929
label.Size = UDim2.new(1, 0, 1, 0)
30-
label.Font = Enum.Font.SourceSans
31-
label.TextSize = 15
30+
label.Font = GuiUtilities.kStandardFontFace
31+
label.TextSize = GuiUtilities.kStandardFontSize
3232
label.TextWrapped = true
3333
label.Parent = frame
3434

src/Workspace/SignsInternal/StudioWidgets/GuiUtilities.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module.kInlineTitleBarHeight = 24
66
module.kStandardContentAreaWidth = 180
77

88
module.kStandardFontSize = 15
9+
module.kStandardFontFace = Enum.Font.SourceSans
10+
module.kStandardFontFaceBold = Enum.Font.SourceSansBold
911

1012
module.kStandardPropertyHeight = 30
1113
module.kSubSectionLabelHeight = 30
@@ -238,8 +240,8 @@ function module.MakeStandardPropertyLabel(text, opt_ignoreThemeUpdates)
238240
label.RichText = true
239241
label.Name = 'Label'
240242
label.BackgroundTransparency = 1
241-
label.Font = Enum.Font.SourceSans -- TODO: input spec font
242-
label.TextSize = 15 -- TODO: input spec font size
243+
label.Font = module.kStandardFontFace
244+
label.TextSize = module.kStandardFontSize
243245
label.TextXAlignment = Enum.TextXAlignment.Left
244246
label.Text = text
245247
label.AnchorPoint = Vector2.new(0, 0.5)

src/Workspace/SignsInternal/StudioWidgets/ImageButtonWithText.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ function ImageButtonWithTextClass.new(name,
5050
textLabel.Size = textSize
5151
textLabel.Position = textPos
5252
textLabel.TextScaled = true
53-
textLabel.Font = Enum.Font.SourceSans
53+
textLabel.Font = GuiUtilities.kStandardFontFace
5454
textLabel.Parent = button
5555

5656
GuiUtilities.syncGuiElementFontColor(textLabel)
5757

5858
local uiTextSizeConstraint = Instance.new("UITextSizeConstraint")
5959
-- Spec asks for fontsize of 12 pixels, but in Roblox the text font sizes look smaller than the mock
6060
--Note: For this font the Roblox text size is 25.7% larger than the design spec.
61-
uiTextSizeConstraint.MaxTextSize = 15
61+
uiTextSizeConstraint.MaxTextSize = GuiUtilities.kStandardFontSize
6262
uiTextSizeConstraint.Parent = textLabel
6363

6464
self._button = button

src/Workspace/SignsInternal/StudioWidgets/LabeledMultiChoice.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ function LabeledMultiChoiceClass.new(nameSuffix, labelText, choices, initChoiceI
2626
local self = {}
2727
setmetatable(self, LabeledMultiChoiceClass)
2828

29+
30+
2931
self._buttonObjsByIndex = {}
3032

3133
if (not initChoiceIndex ) then
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
----------------------------------------
2+
--
3+
-- LabeledSelection.lua
4+
--
5+
----------------------------------------
6+
GuiUtilities = require(script.Parent.GuiUtilities)

src/Workspace/SignsInternal/StudioWidgets/LabeledTextInput.lua

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
GuiUtilities = require(script.Parent.GuiUtilities)
99

1010
local kTextInputWidth = 100
11-
local kTextInputHeight = 18
12-
local kTextBoxInternalPadding = 4
11+
local kTextInputHeight = 22
12+
local kTextBoxInternalPadding = 3
1313

1414
LabeledTextInputClass = {}
1515
LabeledTextInputClass.__index = LabeledTextInputClass
@@ -40,9 +40,9 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
4040
self._value = defaultValue
4141

4242
local textBoxBorder = Instance.new("ImageLabel")
43-
textBoxBorder.Name = "Border"
43+
textBoxBorder.Name = "TextBox"
4444
textBoxBorder.Size = UDim2.new(0, kTextInputWidth, 0, kTextInputHeight)
45-
textBoxBorder.Position = UDim2.new(0, GuiUtilities.StandardLineElementLeftMargin, 0, 6)
45+
textBoxBorder.Position = UDim2.new(0, GuiUtilities.StandardLineElementLeftMargin, 0, kTextBoxInternalPadding)
4646
textBoxBorder.AnchorPoint = Vector2.new(0, 0)
4747
textBoxBorder.BackgroundTransparency = 1
4848
textBoxBorder.Image = "rbxasset://textures/StudioToolbox/RoundedBorder.png"
@@ -51,15 +51,16 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
5151
textBoxBorder.ImageColor3 = GuiUtilities.kStandardBorderColor
5252
textBoxBorder.AutomaticSize = Enum.AutomaticSize.Y
5353
textBoxBorder.Parent = frame
54+
textBoxBorder.ZIndex = 2
5455
GuiUtilities.syncGuiImageBorderColor(textBoxBorder)
5556

5657
-- Dumb hack to add padding to text box,
5758
local textBoxWrapperFrame = Instance.new("Frame")
58-
textBoxWrapperFrame.Name = "Wrapper"
59-
textBoxWrapperFrame.Size = UDim2.new(0, kTextInputWidth - 2, 0, kTextInputHeight - 2)
59+
textBoxWrapperFrame.Name = "TextBoxFrame"
60+
textBoxWrapperFrame.Size = UDim2.new(1, 0, 0, kTextInputHeight)
6061
textBoxWrapperFrame.BorderSizePixel = 0
61-
textBoxWrapperFrame.AnchorPoint = Vector2.new(0.5, 0)
62-
textBoxWrapperFrame.Position = UDim2.new(0.5, 0, 0, 1)
62+
textBoxWrapperFrame.AnchorPoint = Vector2.new(0, 0)
63+
textBoxWrapperFrame.Position = UDim2.new(0, 0, 0, 1)
6364
textBoxWrapperFrame.AutomaticSize = Enum.AutomaticSize.Y
6465
textBoxWrapperFrame.Parent = textBoxBorder
6566
GuiUtilities.syncGuiElementInputFieldColor(textBoxWrapperFrame)
@@ -71,17 +72,16 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
7172
textBox.MultiLine = true
7273
textBox.Text = ""
7374
textBox.PlaceholderText = defaultValue
74-
textBox.Font = Enum.Font.SourceSans
75-
textBox.TextSize = 15
75+
textBox.Font = GuiUtilities.kStandardFontFace
76+
textBox.TextSize = GuiUtilities.kStandardFontSize
7677
textBox.TextWrapped = true
7778
textBox.BackgroundTransparency = 1
7879
textBox.TextXAlignment = Enum.TextXAlignment.Left
7980
textBox.TextYAlignment = Enum.TextYAlignment.Center
80-
textBox.Size = UDim2.new(1, -kTextBoxInternalPadding, 1, GuiUtilities.kTextVerticalFudge)
81-
textBox.Position = UDim2.new(0, kTextBoxInternalPadding, 0, 0)
81+
textBox.Size = UDim2.new(1, -kTextBoxInternalPadding, 0, GuiUtilities.kTextVerticalFudge)
82+
textBox.Position = UDim2.new(0, kTextBoxInternalPadding, 0, kTextBoxInternalPadding)
8283
textBox.AutomaticSize = Enum.AutomaticSize.Y
8384
textBox.ClipsDescendants = true
84-
8585
GuiUtilities.syncGuiElementFontColor(textBox)
8686

8787
textBox:GetPropertyChangedSignal("Text"):Connect(function()

0 commit comments

Comments
 (0)