UI Label
Clean text renderer with font sizing, color styling, and multi-line wrapping.
Type: UILabelNode · Category: UI & Interface · Also found as: uilabel
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
size |
vec2 | (240, 26) |
Width and height (px). Range 4 to 1280. |
text |
string | "Label" |
Label text. |
fontSize |
number | 18 |
Text size (px). Range 8 to 72. |
textColor |
color | #eef0f6ff |
Colour of the text. |
align |
enum: Left, Center, Right |
Left |
Horizontal text alignment. |
drawBackground |
boolean | false |
Fill the background. |
backgroundColor |
color | #1e2026c8 |
Fill colour of the background. |
Plus the common properties every node has.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
UILabelNode:get_property(path)
Section titled “UILabelNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUILabelNodeProperty|string
Returns any
UILabelNode:set_property(path, value, y)
Section titled “UILabelNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUILabelNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "UILabelNode", "name": "UILabel", "position": [ 0, 0 ], "properties": { "size": [ 240, 26 ], "text": "Label", "fontSize": 18 }}