Skip to content

UI Table

Sortable data table; raises row_selected and sorted.

Type: UITableNode · Category: UI & Interface · Also found as: uitable

Property Type Default Description
size vec2 (540, 280) Width and height (px). Range 4 to 1280.
selectedRow integer 0 Index of the selected row.
sortColumn integer 0 Column the rows are sorted by.
sortAscending boolean true Sort ascending (else descending).
headerHeight number 32 Height of the header (px). Range 20 to 60.
rowHeight number 28 Height of each row (px). Range 18 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.

Connects a handler to one of this node’s events: row_selected (A table row was selected), sorted (The table was sorted); the tree events; custom ones.

self.node:connect("row_selected", function(value, source) Log.info("row_selected") end)
  • event UITableNodeEvent|string
  • handler fun(value: any, source: UITableNode)

Returns integer id Connection id for disconnect

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 UITableNodeProperty|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 UITableNodeProperty|string
  • value any
  • y? number
{
"type": "UITableNode",
"name": "UITable",
"position": [
0,
0
],
"properties": {
"size": [
540,
280
],
"selectedRow": 0,
"sortColumn": 0
}
}