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>`
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 CWinCtrlRecastIcon
¶ Functions / Properties
-
CInput::e_State
state
{ get; }¶ Gets the state that the icon is depressed.
-
CInput::e_State
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;
}
}