Fix typo
This commit is contained in:
parent
73a0a0aa03
commit
28074e82b9
|
|
@ -170,18 +170,19 @@ CreateTextButtons = function(frame, buttons, yPos, ySize)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for _, obj in ipairs(buttons) do
|
for _, obj in ipairs(buttons) do
|
||||||
local button = New("TextButton", "Button" .. buttonNum)
|
local button = New("TextButton", "Button" .. tostring(buttonNum), {
|
||||||
button.Font = Enum.Font.Arial
|
Font = Enum.Font.Arial,
|
||||||
button.FontSize = Enum.FontSize.Size18
|
FontSize = Enum.FontSize.Size18,
|
||||||
button.AutoButtonColor = true
|
AutoButtonColor = true,
|
||||||
button.Style = Enum.ButtonStyle.RobloxButton
|
Style = Enum.ButtonStyle.RobloxButton,
|
||||||
button.Text = obj.Text
|
Text = obj.Text,
|
||||||
button.TextColor3 = Color3.new(1, 1, 1)
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
Parent = frame
|
||||||
|
})
|
||||||
button.MouseButton1Click:connect(function()
|
button.MouseButton1Click:connect(function()
|
||||||
toggleSelection(button)
|
toggleSelection(button)
|
||||||
return obj.Function()
|
return obj.Function()
|
||||||
end)
|
end)
|
||||||
button.Parent = frame
|
|
||||||
buttonObjs[buttonNum] = button
|
buttonObjs[buttonNum] = button
|
||||||
buttonNum = buttonNum + 1
|
buttonNum = buttonNum + 1
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -212,25 +212,25 @@ CreateTextButtons = (frame, buttons, yPos, ySize) ->
|
||||||
|
|
||||||
toggleSelection = (button) ->
|
toggleSelection = (button) ->
|
||||||
for _, obj in ipairs buttonObjs
|
for _, obj in ipairs buttonObjs
|
||||||
if obj == button
|
obj.Style = if obj == button
|
||||||
obj.Style = Enum.ButtonStyle.RobloxButtonDefault
|
Enum.ButtonStyle.RobloxButtonDefault
|
||||||
else
|
else
|
||||||
obj.Style = Enum.ButtonStyle.RobloxButton
|
Enum.ButtonStyle.RobloxButton
|
||||||
|
|
||||||
|
|
||||||
for _, obj in ipairs buttons
|
for _, obj in ipairs buttons
|
||||||
button = New "TextButton", "Button" .. buttonNum
|
button = New "TextButton", "Button#{buttonNum}"
|
||||||
button.Font = Enum.Font.Arial
|
Font: Enum.Font.Arial
|
||||||
button.FontSize = Enum.FontSize.Size18
|
FontSize: Enum.FontSize.Size18
|
||||||
button.AutoButtonColor = true
|
AutoButtonColor: true
|
||||||
button.Style = Enum.ButtonStyle.RobloxButton
|
Style: Enum.ButtonStyle.RobloxButton
|
||||||
button.Text = obj.Text
|
Text: obj.Text
|
||||||
button.TextColor3 = Color3.new 1, 1, 1
|
TextColor3: Color3.new 1, 1, 1
|
||||||
|
Parent: frame
|
||||||
|
|
||||||
button.MouseButton1Click\connect ->
|
button.MouseButton1Click\connect ->
|
||||||
toggleSelection button
|
toggleSelection button
|
||||||
obj.Function!
|
obj.Function!
|
||||||
|
|
||||||
button.Parent = frame
|
|
||||||
buttonObjs[buttonNum] = button
|
buttonObjs[buttonNum] = button
|
||||||
|
|
||||||
buttonNum += 1
|
buttonNum += 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue