Skip to content
CI edited this page Nov 3, 2025 · 8 revisions

SettingObject

Table containing the following entries:

key value type required
kind setting type SettingType yes
name label for the setting string yes
default default value for the setting any yes
get getter for the current value function yes
set setter for the new value function yes
  • The getter passes layoutName as the sole argument and expects a value in return.
  • The setter passes (layoutName, newValue) and expects no returns.

Depending on the setting type there are additional required and optional entries:

Dropdown

key value type required
values indexed table containing DropdownOptions table no
generator Dropdown SetupMenu "generator" (callback) function no
height max height of the menu integer no
  • Either values or generator is required, the former for simple menues and the latter for complex ones.
    • They are not exclusive, but generator takes precedence (e.g. values will be available but not used).
  • generator signature is (dropdown, rootDescription, settingObject) - settingObject being the addition to the default arguments.
  • getters and setters are not handled using generator, and must be handled by the layout

DropdownOption

Table containing the following entries:

key value type required
text text rendered in the dropdown string yes
value value the text represents, defaults to the text if not provided any no
isRadio turns the dropdown entry into a Radio button, otherwise a Checkbox boolean no

Slider

key value type required default
minValue lower bound for the slider number no 0
maxValue upper bound for the slider number no 1
valueStep step increment between each value number no 1
formatter formatter for the display value function no
  • The formatter passes value as the sole argument and expects a number value in return.

ButtonObject

Table containing the following entries:

key value type required
text text rendered on the button string yes
click callback when button is clicked function yes

SettingType

Table containing available setting types.

One of:

  • Dropdown
  • Checkbox
  • Slider
  • Divider
Clone this wiki locally