CWinCtrlRecastIcon

Script: RECASTICON

It is a control to display a recast icon.

It is possible to display eight texture parts.

This is almost the same behavior as the ICON .

If you make a set of recast value, the specified texture parts do animation which it becomes gradually extending from the bottom. If you set 0 to display as TEXTURE . If you set 1 or more, it hides.

Callbacks arriving at :class:`CWindowBase<CWindowBase>`

class CWinCtrlRecastIcon

Functions / Properties

CInput::e_State state { get; }

Gets the state that the icon is depressed.

void setRecastTime (Int32 index, Single tmRecast)
Param int index

Texture part number for the recast animation

Param float tmRecast

Animation Time [0 … 1]

Set a recast time.

public Single getRecastTime (Int32 index)
Param int index

Texture part number for the recast animation

Return float

remaining animation time

Get a recast time.

Example of use

// get control
CWinCtrlRecastIcon     rcItem = find(RECASTICON_Item) as CWinCtrlRecastIcon;

// Recast Display (Display half of the texture of TEX_ID3)
rcItem.setRecastTime(3,0.5f);

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