Beispiel #1
0
 bool UIInputManager::onTouchCanceled(float x,float y)
 {
     this->m_bTouchDown = false;
     CocoWidget* hitWidget = this->m_pCurSelectedWidget;
     if (!hitWidget || !hitWidget->getActive()){
         return false;
     }
     this->touchEndedPoint.x = x;
     this->touchEndedPoint.y = y;
     hitWidget->onTouchReleased(this->touchEndedPoint);
     this->m_pCurSelectedWidget = NULL;
     hitWidget = NULL;
     return true;
 }
Beispiel #2
0
 bool UIInputManager::onTouchCanceled(cocos2d::CCTouch* touch)
 {
     this->m_bTouchDown = false;
     CocoWidget* hitWidget = this->m_pCurSelectedWidget;
     if (!hitWidget || !hitWidget->getActive()){
         return false;
     }
     this->touchEndedPoint.x = touch->getLocation().x;
     this->touchEndedPoint.y = touch->getLocation().y;
     hitWidget->onTouchReleased(this->touchEndedPoint);
     this->m_pCurSelectedWidget = NULL;
     hitWidget = NULL;
     return true;
 }