Skip to main content

Label

Label

Usage​

Client/Index.lua
local label = EGUI.Label(10, 10, 100, 100, "Label Test")

Constructor Parameters​

TypeNameDefault
numberposX
numberposY
numberwidth
numberheight
stringtext
tableparentnil

Functions​

Inherited Element Functions
ReturnsNameDescription
Base ElementSetVisibleSets element visibility
booleanIsVisibleReturns if element is visible
Base ElementSetAlphaSets element alpha
numberGetAlphaReturns element alpha
Base ElementSetPositionSets element position
number, numberGetPositionReturns element position
Base ElementSetSizeSets element size
number, numberGetSizeReturns element size
Base ElementSetAlignmentSets element alignment
stringGetAlignmentGets element alignment
SubscribeSubscribes to an event
UnsubscribeUnsubscribes from a event
ReturnsNameDescription
LabelSetTextSets the text
stringGetTextGets the text
LabelSetFontSizeSets the font size
numberGetFontSizeGets the font size
LabelSetLineHeightSets the line height
numberGetLineHeightGets the line height

SetText​

Sets the text of the label

Returns the Label (self)

label:SetText("Text")
TypeParameterDefault ValueDescription
stringtextThe new text

GetText​

Gets the text of the label

Returns a string

local text = label:GetText()

SetFontSize​

Sets the font size of the label

Returns the Label (self)

label:SetFontSize(20)
TypeParameterDefault ValueDescription
stringsizeThe new size in pixels

GetFontSize​

Gets the font size of the label

Returns a number

local size = label:GetFontSize()

SetLineHeight​

Sets the line height of the label

Returns the Label (self)

label:SetLineHeight(20)
TypeParameterDefault ValueDescription
stringsizeThe new line height in pixels

GetLineHeight​

Gets the line height of the label

Returns a number

local lineHeight = label:GetLineHeight()