Skip to content

UI Tree View

Hierarchical expandable tree.

Type: UITreeViewNode · Category: UI & Interface · Also found as: uitreeview

Property Type Default Description
size vec2 (220, 200) Width and height (px). Range 4 to 1280.
selectedId integer -1 Id of the selected item (-1 = none). Range -1 to 1000.
itemHeight number 22 Height of each row (px). Range 16 to 48.

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 UITreeViewNodeProperty|string

Returns any

UITreeViewNode:set_property(path, value, y)

Section titled “UITreeViewNode: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.” a field of the node’s script.

self.node:set_property("size", 100, 50)
  • path UITreeViewNodeProperty|string
  • value any
  • y? number
{
"type": "UITreeViewNode",
"name": "UITreeView",
"position": [
0,
0
],
"properties": {
"size": [
220,
200
],
"selectedId": -1,
"itemHeight": 22
}
}