Exceptions for elements with list (combo, selectable, list, listable)
Due to their arguments style, you will have to modify them a bit in order to use pui features. You can still use them like they are if you don't need additional features.
What does a pui_element contain?
pui::element is a table of variables that you can use in some cases.
For example: switch.value returns the current switch value
Variable
Description
.value
Current value. Includes overridden one too.
.ref
Original neverlose reference.
.color
This table is a pui::element of your color picker. For example:
.color.value, .color:set() d
Children elements
Children elements are those gears or color pickers near the main elements.
If you want to add a gear elements, see this:
Definition of children:
Let's see.
Variable
Description
gear
The gear created when you want to add children
self
The table of a main element. Be careful when using it.
elements
A table of pui elements you want to pass to gear.
condition
A global condition, that will make your children visible or invisible depending on if it's met or not. See :depend method for more info.
Example
This example shows a switch. It contains children elements: bar and button. Also you can see, that you may operate them just like regular pui elements. These elements will be shown only if the main switch is enabled (true).
Accesing children elements
If you want to add a color picker, the second pui argument should be a color (it will be used as a default color)