CheckButton
Globals
UI_BUTTON_DISABLED
integer
UI_BUTTON_HIGHLIGHTED
integer
UI_BUTTON_MAX
integer
UI_BUTTON_NORMAL
integer
UI_BUTTON_PUSHED
integer
Classes
Class: CheckButton
Extends Button
A
CheckButtonwidget is a small clickable widget that represents a binary on/off or true/false setting or option. It inherits from Button and supports the same four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Adds checked/unchecked state management with separate background drawables for checked and disabled-checked states. Can trigger the widget"OnCheckChanged"action.Dependencies:
- TextStyle used for the
stylefield.
Method: GetChecked
(method) CheckButton:GetChecked()
-> checked: boolean
Returns a boolean indicating the state of the CheckButton.
@return
checked—trueif the CheckButton is checked,falseotherwise. (default:false)
Method: SetCheckedBackground
(method) CheckButton:SetCheckedBackground(checkedTable: DrawableDDS)
Sets the background for the checked state of the CheckButton.
@param
checkedTable— The table defining the checked state background.See: DrawableDDS
Method: SetChecked
(method) CheckButton:SetChecked(state: boolean, trigger: boolean|nil)
Sets the state of the CheckButton.
@param
state—trueto check the CheckButton,falseto uncheck. (default:false)@param
trigger—trueto trigger the"OnCheckChanged"action,falseto do nothing. (default:false)
Method: SetDisabledCheckedBackground
(method) CheckButton:SetDisabledCheckedBackground(disabledCheckedTable: DrawableDDS)
Sets the background for the disabled checked state of the CheckButton.
@param
disabledCheckedTable— The table defining the disabled checked state background.See: DrawableDDS