CheckStatus
elements.CheckStatus (Abstract)
Represents the status of a checkbox or toggle control with change tracking.
This abstract type efficiently packs both the checked state and whether the state just changed into a single integer using bit flags:
- Bit 0: Whether the checkbox is checked
- Bit 1: Whether the state changed in the current frame
The type can be implicitly converted to Bool (returns true if changed), making it convenient for change detection in conditionals.
Example usage:
var status:CheckStatus = getCheckboxStatus();
if (status) { // Implicitly checks if changed
if (status.justChecked) {
trace("Checkbox was just checked!");
} else if (status.justUnchecked) {
trace("Checkbox was just unchecked!");
}
}
Type Conversions
From:
[Int](/api-docs/clay-native/Int/)
To:
[Int](/api-docs/clay-native/Int/)