Skip to main content

Checkbox

Example

var checkbox = new UiCheckbox(0, 0, 100, 20);
with (checkbox.state) {
text = "My Checkbox";
checked = true
on_click = function() {
show_message("Checkbox clicked!");
}
}

State reference

VariableDescriptionTypeDefault
textCheckbox displayed textString
statusCurrent status of the checkboxRealui_enum_checkbox_status.idle
typeCheckbox typeRealui_enum_variants.primary
checkedIf the input is currently checkedBoolfalse
click_buttonWhich button to check for the clickRealmb_left
click_typeWhich mouse event to check for the clickRealui_enum_click_type.released
on_click(component)

Called when clicking on the checkbox. The passed argument is the component itself

Enums

EnumValues
ui_enum_checkbox_statusidle/clicked/hover