88GuiUtilities = require (script .Parent .GuiUtilities )
99
1010local kTextInputWidth = 100
11+ local kTextInputHeight = 18
1112local kTextBoxInternalPadding = 4
1213
1314LabeledTextInputClass = {}
@@ -29,6 +30,7 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
2930 local defaultValue = defaultValue or " "
3031
3132 local frame = GuiUtilities .MakeStandardFixedHeightFrame (' TextInput ' .. nameSuffix )
33+ frame .AutomaticSize = Enum .AutomaticSize .Y
3234 self ._frame = frame
3335
3436 local label = GuiUtilities .MakeStandardPropertyLabel (labelText )
@@ -40,10 +42,10 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
4042 -- Dumb hack to add padding to text box,
4143 local textBoxWrapperFrame = Instance .new (" Frame" )
4244 textBoxWrapperFrame .Name = " Wrapper"
43- textBoxWrapperFrame .Size = UDim2 .new (0 , kTextInputWidth , 0.6 , 0 )
44- textBoxWrapperFrame .Position = UDim2 .new (0 , GuiUtilities .StandardLineElementLeftMargin , .5 , 0 )
45- textBoxWrapperFrame .AnchorPoint = Vector2 .new (0 , .5 )
46- textBoxWrapperFrame .AutomaticSize = Enum .AutomaticSize .X
45+ textBoxWrapperFrame .Size = UDim2 .new (0 , kTextInputWidth , 0 , kTextInputHeight )
46+ textBoxWrapperFrame .Position = UDim2 .new (0 , GuiUtilities .StandardLineElementLeftMargin , 0 , 6 )
47+ textBoxWrapperFrame .AnchorPoint = Vector2 .new (0 , 0 )
48+ textBoxWrapperFrame .AutomaticSize = Enum .AutomaticSize .Y
4749 textBoxWrapperFrame .Parent = frame
4850 GuiUtilities .syncGuiElementInputFieldColor (textBoxWrapperFrame )
4951 GuiUtilities .syncGuiElementBorderColor (textBoxWrapperFrame )
@@ -52,14 +54,17 @@ function LabeledTextInputClass.new(nameSuffix, labelText, defaultValue)
5254 textBox .Parent = textBoxWrapperFrame
5355 textBox .Name = " TextBox"
5456 textBox .ClearTextOnFocus = false
57+ textBox .MultiLine = true
5558 textBox .Text = defaultValue
5659 textBox .Font = Enum .Font .SourceSans
5760 textBox .TextSize = 15
61+ textBox .TextWrapped = true
5862 textBox .BackgroundTransparency = 1
5963 textBox .TextXAlignment = Enum .TextXAlignment .Left
64+ textBox .TextYAlignment = Enum .TextYAlignment .Center
6065 textBox .Size = UDim2 .new (1 , - kTextBoxInternalPadding , 1 , GuiUtilities .kTextVerticalFudge )
6166 textBox .Position = UDim2 .new (0 , kTextBoxInternalPadding , 0 , 0 )
62- textBox .AutomaticSize = Enum .AutomaticSize .X
67+ textBox .AutomaticSize = Enum .AutomaticSize .Y
6368 textBox .ClipsDescendants = true
6469
6570 GuiUtilities .syncGuiElementFontColor (textBox )
0 commit comments