Exemplo n.º 1
0
 bool UIInputManager::onTouchPressed(float x,float y)
 {
     this->touchBeganedPoint.x = x;
     this->touchBeganedPoint.y = y;
     CocoWidget* hitWidget = this->checkEventWidget(this->touchBeganedPoint);
     if (!hitWidget || !hitWidget->getActive()){
         this->m_pCurSelectedWidget = NULL;
         return false;
     }
     this->m_pCurSelectedWidget = hitWidget;
     hitWidget->onTouchPressed(this->touchBeganedPoint);
     this->m_bTouchDown = true;
     return true;
 }
Exemplo n.º 2
0
 bool UIInputManager::onTouchPressed(cocos2d::CCTouch* touch)
 {
     this->touchBeganedPoint.x = touch->getLocation().x;
     this->touchBeganedPoint.y = touch->getLocation().y;
     CocoWidget* hitWidget = this->checkEventWidget(this->touchBeganedPoint);
     if (!hitWidget || !hitWidget->getActive()){
         this->m_pCurSelectedWidget = NULL;
         return false;
     }
     this->m_pCurSelectedWidget = hitWidget;
     hitWidget->onTouchPressed(this->touchBeganedPoint);
     this->m_bTouchDown = true;
     return true;
 }