77---- ------------------------------------
88GuiUtilities = require (script .Parent .GuiUtilities )
99
10- local kTextInputHeight = 16
11- local kTextBoxInternalPadding = 3
10+ local kTextBoxInternalPadding = 8
1211
1312LabeledTextInputClass = {}
1413LabeledTextInputClass .__index = LabeledTextInputClass
1514
16- function LabeledTextInputClass .new (nameSuffix , labelText , defaultValue , wikiLink )
15+ function LabeledTextInputClass .new (nameSuffix , labelText , defaultValue , url )
1716 local self = {}
1817 setmetatable (self , LabeledTextInputClass )
1918
@@ -32,16 +31,16 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue, wikiLink
3231 frame .AutomaticSize = Enum .AutomaticSize .Y
3332 self ._frame = frame
3433
35- local label = GuiUtilities .MakeDefaultPropertyLabel (labelText , false , wikiLink )
34+ local label = GuiUtilities .MakeDefaultPropertyLabel (labelText , false , url )
3635 label .Parent = frame
3736 self ._label = label
3837
3938 self ._value = defaultValue
4039
4140 local textBoxBorder = Instance .new (" ImageLabel" )
42- textBoxBorder .Name = " TextBox "
41+ textBoxBorder .Name = " TextBoxBorder "
4342 textBoxBorder .Size = UDim2 .new (1 , - GuiUtilities .DefaultRightMargin , 0 , GuiUtilities .kTextInputHeight )
44- textBoxBorder .Position = UDim2 .new (0 , GuiUtilities .DefaultLineElementLeftMargin , 0 , kTextBoxInternalPadding )
43+ textBoxBorder .Position = UDim2 .new (0 , GuiUtilities .DefaultLineElementLeftMargin , 0 , 4 )
4544 textBoxBorder .AnchorPoint = Vector2 .new (0 , 0 )
4645 textBoxBorder .BackgroundTransparency = 1
4746 textBoxBorder .ScaleType = Enum .ScaleType .Slice
@@ -57,7 +56,7 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue, wikiLink
5756 -- Dumb hack to add padding to text box,
5857 local textBoxBackground = Instance .new (" ImageLabel" )
5958 textBoxBackground .Name = " TextBoxFrame"
60- textBoxBackground .Size = UDim2 .new (1 , 0 , 0 , kTextInputHeight )
59+ textBoxBackground .Size = UDim2 .new (1 , 0 , 0 , GuiUtilities . kTextInputHeight )
6160 textBoxBackground .BorderSizePixel = 0
6261 textBoxBackground .Image = " rbxasset://textures/StudioToolbox/RoundedBackground.png"
6362 textBoxBackground .AnchorPoint = Vector2 .new (0 , 0 )
@@ -82,12 +81,13 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue, wikiLink
8281 textBox .TextWrapped = true
8382 textBox .BackgroundTransparency = 1
8483 textBox .TextXAlignment = Enum .TextXAlignment .Left
85- textBox .TextYAlignment = Enum .TextYAlignment .Top
86- textBox .AnchorPoint = Vector2 .new (0 , 0 )
87- textBox .Size = UDim2 .new (1 , 0 , 1 , 0 )
88- textBox .Position = UDim2 .new (0 , kTextBoxInternalPadding , 0 , kTextBoxInternalPadding )
84+ textBox .TextYAlignment = Enum .TextYAlignment .Center
85+ textBox .AnchorPoint = Vector2 .new (0.5 , 0 )
86+ textBox .Size = UDim2 .new (1 , - kTextBoxInternalPadding , 0 , GuiUtilities . kTextInputHeight )
87+ textBox .Position = UDim2 .new (0.5 , 0 , 0 , 0 )
8988 textBox .AutomaticSize = Enum .AutomaticSize .Y
9089 textBox .ClipsDescendants = true
90+ GuiUtilities .syncGuiElementPlaceholderColor (textBox )
9191 GuiUtilities .syncGuiElementFontColor (textBox )
9292 self ._textBox = textBox
9393
0 commit comments