CWinCtrlButton

Script: BUTTON

This is a button control .

It is possible to display some of the badge and the caption.

It can have seven badges at the maximum.

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)

void onDropGround(CWinCtrlBase cCtrl)

Example of use

// get control
CWinCtrlButton ctrlStart = find<CWinCtrlButton>(BUTTON_Start);

// click call back
override protected void onClick(CWinCtrlBase cCtrl) {
 switch (cCtrl.id) {
  case BUTTON_Start:
    break;
 }
// hold callback.
override protected void onHold(CWinCtrlBase cCtrl) {
 switch (cCtrl.id) {
  case BUTTON_Start:
    break;
 }