-
Notifications
You must be signed in to change notification settings - Fork 38
Label
Robert Jelic edited this page May 29, 2022
·
11 revisions
With the Label object you are able to add some text.
By default label's width is auto sizing based on the length of the text. If you change the size with setSize it will automatically stop autosizing the width.
Here are all possible functions available for labels.
Remember label inherits from object:
sets the text which gets displayed.
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello lovely basalt community!"):show()
arguments: string text
returns: self
sets the font size of that text.
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
arguments: number size (1 = default, 2 = big, 3 = bigger, 4 = huge)
returns: self
returns the fontsize
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
basalt.debug(aInput:getFontSize()) -- returns 2
arguments:
returns: number
Thanks for checking out our wiki, join our discord for more help: discord.gg/yM7kndJdJJ