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