Skip to content

UI Tab Container

Tabbed pages container.

Type: UITabContainerNode · Category: UI & Interface · Also found as: uitabcontainer

Property Type Default Description
size vec2 (440, 400) Width and height (px). Range 4 to 1280.
title string "" Header text.
direction enum: Vertical, Horizontal, Grid Vertical Children are laid out in a column, a row or a grid.
alignment enum: Start, Center, End, Stretch Stretch Where children sit across the layout direction.
spacing number 8 Gap between items (px). Range 0 to 64.
paddingTop number 12 Space above the children (px). Range 0 to 100.
paddingBottom number 12 Space below the children (px). Range 0 to 100.
paddingLeft number 14 Space left of the children (px). Range 0 to 100.
paddingRight number 14 Space right of the children (px). Range 0 to 100.
columns integer 0 Grid layout: columns per row. Range 1 to 12.
autoSizeHeight boolean false Grow to fit the children.
drawBackground boolean true Fill the background.
drawBorder boolean true Draw a border.
showHeader boolean false Draw a header with the title.
headerHeight number 0 Height of the header (px). Range 20 to 64.
backgroundColor color #16181ef2 Fill colour of the background.
headerColor color #00000000 Header fill colour.
borderColor color #373e4eff Colour of the border.
titleColor color #00000000 Title text colour.
tabDirection enum: Horizontal, Vertical Horizontal Tabs along the top or the side.
activeTab integer 0 Index of the shown tab (child). Range 0 to 16.
tabSize number 30 Tab height (or width when vertical; px). Range 20 to 64.

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

Returns any

UITabContainerNode:set_property(path, value, y)

Section titled “UITabContainerNode: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 UITabContainerNodeProperty|string
  • value any
  • y? number
{
"type": "UITabContainerNode",
"name": "UITabContainer",
"position": [
0,
0
],
"properties": {
"size": [
440,
400
],
"title": "",
"direction": "Vertical"
}
}