Skip to content

UI Label

Clean text renderer with font sizing, color styling, and multi-line wrapping.

Type: UILabelNode · Category: UI & Interface · Also found as: uilabel

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.

Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.

Reads an Inspector property by its path (vectors and colours as tables); “script.” reads a field of the node’s script.

local value = self.node:get_property("size")
  • path UILabelNodeProperty|string

Returns any

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.” a field of the node’s script.

self.node:set_property("size", 100, 50)
  • path UILabelNodeProperty|string
  • value any
  • y? number
{
"type": "UILabelNode",
"name": "UILabel",
"position": [
0,
0
],
"properties": {
"size": [
240,
26
],
"text": "Label",
"fontSize": 18
}
}