imguiCheck

Define a new checkbox.

bool
imguiCheck

Parameters

label const(char)[]

The text that will be displayed on the button.

checkState bool*

A pointer to a variable which holds the current state of the checkbox.

enabled Enabled

Set whether the checkbox can be pressed.

colorScheme ColorScheme

Optionally override the current default color scheme when creating this element.

Return Value

Type: bool

true if the checkbox was toggled on or off. Note that toggling implies pressing and releasing the left mouse button while over the checkbox.

Examples

bool checkState = false;  // initially un-checked
if (imguiCheck("checkbox", &checkState))  // checkbox was toggled
    writeln(checkState);  // check the current state

Meta