Skip to content

UI Bullet List

HTML-style unordered list.

Type: UIUnorderedListNode · Category: UI & Interface · Also found as: uiunorderedlist

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).
defaultBullet enum: Disc, Circle, Square, Dash, Arrow Disc Bullet style for items without their own.
itemHeight number 24 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.

UIUnorderedListNode:connect(event, handler)

Section titled “UIUnorderedListNode: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)
  • event UIUnorderedListNodeEvent|string
  • handler fun(value: any, source: UIUnorderedListNode)

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

Returns any

UIUnorderedListNode:set_property(path, value, y)

Section titled “UIUnorderedListNode: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 UIUnorderedListNodeProperty|string
  • value any
  • y? number
{
"type": "UIUnorderedListNode",
"name": "UIBulletList",
"position": [
0,
0
],
"properties": {
"size": [
320,
220
],
"selectedIndex": 0,
"defaultBullet": "Disc"
}
}