ui_checkbox
result = ui_checkbox(label, [default], [id=])
Input: label, default, id · Output: result
What it is
Declares an on/off toggle, labeled label (string). default (bool, positional, default false) and id= (string) as above.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = ui_checkbox(label, [default], [id=]) | label stringDeclares an on/off toggle, labeled label (string).default bool or string, optionaldefault (bool, positional, default false) and id= (string) as above.id bool or string, optionaldefault (bool, positional, default false) and id= (string) as above. | result bool | Returns the current (or default) value as a bool. These two (ui_select/ui_checkbox) are for a parameter that is a mode rather than a magnitude. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
freq = ui_slider("freq", 1, 20, 5)
gain = ui_number("gain", 1.0)
mode = ui_select("mode", ["fast", "slow"])
enabled = ui_checkbox("enabled", true)
pressed = ui_button("reset")
label = ui_text("label", "wave")
print(freq)
print(gain)
print(mode)
print(enabled)
print(pressed)
print(label)
output
5 1 fast true false wave
from plotting
How it works
ui_checkbox(label, [default], [id=])
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.