imguiButton

Define a new button.

bool
imguiButton

Parameters

label
Type: const(char)[]

The text that will be displayed on the button.

enabled
Type: Enabled

Set whether the button can be pressed.

colorScheme

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

Return Value

Type: bool

true if the button is enabled and was pressed. Note that pressing a button implies pressing and releasing the left mouse button while over the gui button.

Examples

void onPress() { }
if (imguiButton("Push me"))  // button was pushed
    onPress();

Meta