Skip to content

UI Icon

Vector icon.

Type: UIIconNode · Category: UI & Interface · Also found as: uiicon

Property Type Default Description
size vec2 (28, 28) Width and height (px). Range 4 to 1280.
icon enum: None, Digit0, Digit1, Digit2, Digit3, Digit4, Digit5, Digit6, Digit7, Digit8, Digit9, A … None Icon shown (Font Awesome).
iconSize number 0 Icon size (px). Range 8 to 128.
color color #eef0f6ff Icon colour.
align enum: Left, Center, Right Center Horizontal text alignment.

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 UIIconNodeProperty|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 UIIconNodeProperty|string
  • value any
  • y? number
{
"type": "UIIconNode",
"name": "UIIcon",
"position": [
0,
0
],
"properties": {
"size": [
28,
28
],
"icon": "None",
"iconSize": 0
}
}