Label
Usage​
Client/Index.lua
local label = EGUI.Label(10, 10, 100, 100, "Label Test")
Constructor Parameters​
Type | Name | Default |
---|---|---|
number | posX | |
number | posY | |
number | width | |
number | height | |
string | text | |
table | parent | nil |
Functions​
Inherited Element Functions
Returns | Name | Description |
---|---|---|
Base Element | SetVisible | Sets element visibility |
boolean | IsVisible | Returns if element is visible |
Base Element | SetAlpha | Sets element alpha |
number | GetAlpha | Returns element alpha |
Base Element | SetPosition | Sets element position |
number , number | GetPosition | Returns element position |
Base Element | SetSize | Sets element size |
number , number | GetSize | Returns element size |
Base Element | SetAlignment | Sets element alignment |
string | GetAlignment | Gets element alignment |
Subscribe | Subscribes to an event | |
Unsubscribe | Unsubscribes from a event |
Returns | Name | Description |
---|---|---|
Label | SetText | Sets the text |
string | GetText | Gets the text |
Label | SetFontSize | Sets the font size |
number | GetFontSize | Gets the font size |
Label | SetLineHeight | Sets the line height |
number | GetLineHeight | Gets the line height |
SetText​
Sets the text of the label
Returns the
Label
(self)
label:SetText("Text")
Type | Parameter | Default Value | Description |
---|---|---|---|
string | text | The 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)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | size | The 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)
Type | Parameter | Default Value | Description |
---|---|---|---|
string | size | The new line height in pixels |
GetLineHeight​
Gets the line height of the label
Returns a
number
local lineHeight = label:GetLineHeight()