CWinCtrlIcon¶
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)
Example of use
// get cotrol
CWinCtrlIcon icnItem = find(ICON_Item) as CWinCtrlIcon;
// click callback
override protected void onClick(CWinCtrlBase cCtrl) {
switch (cCtrl.id) {
case ICON_Item:
break;
}
}
// hold callback
override protected void onHold(CWinCtrlBase cCtrl) {
switch (cCtrl.id) {
case ICON_Item:
break;
}
}