-
-
Notifications
You must be signed in to change notification settings - Fork 1
Types
CI edited this page Feb 10, 2026
·
12 revisions
Table containing the following entries:
| key | value | type | required |
|---|---|---|---|
| kind | setting type | SettingType | yes |
| name | label for the setting | string | yes |
| desc | description for the setting | string | no |
| default | default value for the setting | any | yes |
| get | getter for the current value | function | yes |
| set | setter for the new value | function | yes |
| disabled | whether the setting should be disabled | boolean/function | no |
| hidden | whether the setting should be hidden | boolean/function | no |
- The getter passes
layoutNameas the sole argument and expects a value in return. - The setter passes (
layoutName,newValue,fromReset) and expects no returns. - The description is shown in a tooltip.
- The
disabledandhiddenoptions, if added as functions, must return a boolean
Depending on the setting type there are additional required and optional entries:
| key | value | type | required |
|---|---|---|---|
| values | indexed table containing DropdownOptions or a function that returns a compatible table | table/function | no |
| multiple | whether the dropdown should allow selecing multiple options | boolean | no |
| generator | Dropdown SetupMenu "generator" (callback) |
function | no |
| height | max height of the menu | integer | no |
- Either
valuesorgeneratoris required, the former for simple menues and the latter for complex ones.- They are not exclusive, but
generatortakes precedence (e.g.valueswill be available but not used).
- They are not exclusive, but
-
generatorsignature is(dropdown, rootDescription, settingObject)-settingObjectbeing the addition to the default arguments. - getters and setters are not handled using
generator, and must be handled by the layout
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 |
| 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
valueas the sole argument and expects a number value in return.
| key | value | type | required | default |
|---|---|---|---|---|
| hasOpacity | whether or not to enable opacity | boolean | no | false |
The default field and the getter expects a ColorMixin object, and the setter will pass one as its value.
Even if hasOpacity is set to false (which is the default value) the ColorMixin object will contain an alpha value, this is the default behavior of the ColorMixin.
| key | value | type | required | default |
|---|---|---|---|---|
| hideLabel | whether or not to hide the label | boolean | no | false |
| key | value | type | required | default |
|---|---|---|---|---|
| hideArrow | whether or not to hide the arrow | boolean | no | false |
| expandedLabel | text to display when expanded | string | no | |
| collapsedLabel | text to display when collapsed | string | no |
For expandedLabel or collapsedLabel to work both have to be defined. Otherwise the setting name will be used.
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 |
Table containing available setting types.
One of:
DropdownCheckboxSliderDividerColorPickerExpander