UI Numbered List
HTML-style ordered list.
Type: UIOrderedListNode · Category: UI & Interface · Also found as: uiorderedlist
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
size |
vec2 | (320, 220) |
Width and height (px). Range 4 to 1280. |
selectedIndex |
integer | 0 |
Index of the selected item (-1 = none). |
numbering |
enum: Decimal, AlphaLower, AlphaUpper, RomanLower, RomanUpper |
Decimal |
Numbering style (1, a, i…). |
startNumber |
integer | 1 |
Number of the first item. Range 1 to 100. |
itemHeight |
number | 24 |
Height of each row (px). Range 16 to 48. |
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.
UIOrderedListNode:connect(event, handler)
Section titled “UIOrderedListNode:connect(event, handler)”Connects a handler to one of this node’s events: selected (The selection changed); the tree events; custom ones.
self.node:connect("selected", function(value, source) Log.info("selected") end)eventUIOrderedListNodeEvent|stringhandlerfun(value:any, source: UIOrderedListNode)
Returns integer id Connection id for disconnect
UIOrderedListNode:get_property(path)
Section titled “UIOrderedListNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIOrderedListNodeProperty|string
Returns any
UIOrderedListNode:set_property(path, value, y)
Section titled “UIOrderedListNode: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)pathUIOrderedListNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "UIOrderedListNode", "name": "UINumberedList", "position": [ 0, 0 ], "properties": { "size": [ 320, 220 ], "selectedIndex": 0, "numbering": "Decimal" }}