本文整理汇总了C++中GuiControl::onMouseUp方法的典型用法代码示例。如果您正苦于以下问题:C++ GuiControl::onMouseUp方法的具体用法?C++ GuiControl::onMouseUp怎么用?C++ GuiControl::onMouseUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuiControl
的用法示例。
在下文中一共展示了GuiControl::onMouseUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onMouseUp
void GuiDecoyCtrl::onMouseUp(const GuiEvent &event)
{
mouseUnlock();
setUpdate();
//this code is pretty hacky. right now there is no way that guiCanvas will allow sending more than
//one signal to one gui control at a time.
if(mIsDecoy == true)
{
mVisible = false;
GuiControl *parent = getParent();
Point2I localPoint = parent->globalToLocalCoord(event.mousePoint);
GuiControl *tempControl = parent->findHitControl(localPoint);
//the decoy control has the responsibility of keeping track of the decoyed controls status
if( mDecoyReference != NULL && tempControl == mDecoyReference)
tempControl->onMouseUp(event);
else if(mDecoyReference != NULL && tempControl != mDecoyReference)
{
//as explained earlier, this control was written in the mindset for buttons.
//nothing bad should ever happen if not a button due to the checks in this function though.
GuiButtonBaseCtrl *unCastCtrl = NULL;
unCastCtrl = dynamic_cast<GuiButtonBaseCtrl *>( mDecoyReference );
if(unCastCtrl != NULL)
unCastCtrl->resetState();
}
mVisible = true;
}
}