CWinCtrlCheckbox¶
Callbacks arriving at :class:`CWindowBase<CWindowBase>`
void onClick(CWinCtrlBase cCtrl)
void onHold(CWinCtrlBase cCtrl)
void onBeginDrag(CWinCtrlBase cCtrl,Vector2 pos)
void onDrag(CWinCtrlBase cCtrl,Vector2 pos,Vector2 dragVelocity)
bool onDragRender(CWinCtrlBase cCtrl,Transform transform)
void onDrop(CWinCtrlBase cCtrl,CWindowBase cDragWindow,CWinCtrlBase cDragCtrl)
-
class CWinCtrlCheckBox
¶ -
Change a check box status.
true:
Turn ON and active any associated content.
false:
Turn OFF and hide any associated content.
Example of use
// get control
CWinCtrlCheckbox cbSelect = find<CWinCtrlCheckbox>(CHECKBOX_Select);
if (cbSelect.check) {
//on
} else {
//off
}
// Get BUTTON(A) from within content
// Content in the container can be accessed by find as follows
CWinCtrlButton btnA = find<CWinCtrlButton>(BUTTON_A);
// click callback
override protected void onClick(CWinCtrlBase cCtrl) {
switch (cCtrl.id) {
case CHECKBOX_Select:
break;
}
}
// hold callback
override protected void onHold(CWinCtrlBase cCtrl) {
switch (cCtrl.id) {
case CHECKBOX_Select:
break;
}
}