CWinCtrlTexture

Script: TEXTURE

This is a control for displaying a texture part .

It is possible to display eight texture parts.

Callbacks arriving at CWindowBase

This control’s style is set NOHIT flag as default. If you want to receive onDrag callback,you need to set HIT flag to STYLE property.

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)

Functions / Properties

None

Example of use

// get control
CWinCtrlTexture        texAttribute = find<CWinCtrlTexture>(TEXTURE_Attribute);

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