void CCLayer::registerWithTouchDispatcher() { CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher(); // Using LuaBindings if (m_pScriptTouchHandlerEntry) { if (m_pScriptTouchHandlerEntry->isMultiTouches()) { pDispatcher->addStandardDelegate(this, 0); LUALOG("[LUA] Add multi-touches event handler: %d", m_pScriptTouchHandlerEntry->getHandler()); } else { pDispatcher->addTargetedDelegate(this, m_pScriptTouchHandlerEntry->getPriority(), m_pScriptTouchHandlerEntry->getSwallowsTouches()); LUALOG("[LUA] Add touch event handler: %d", m_pScriptTouchHandlerEntry->getHandler()); } } else { if( m_eTouchMode == kCCTouchesAllAtOnce ) { pDispatcher->addStandardDelegate(this, 0); } else { pDispatcher->addTargetedDelegate(this, m_nTouchPriority, true); } } }
void CCLayer::registerWithTouchDispatcher() { CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher(); if( m_eTouchMode == kCCTouchesAllAtOnce ) { pDispatcher->addStandardDelegate(this, 0); } else { pDispatcher->addTargetedDelegate(this, m_nTouchPriority, m_bSwallowTouch); } }
void TouchComponent::registerWithTouchDispatcher( ) { CCTouchDispatcher *pDispatcher = CCDirector::sharedDirector( )->getTouchDispatcher( ); if ( _touchMode == ALL_AT_ONCE ) { pDispatcher->addStandardDelegate( this, 0 ); } else { pDispatcher->addTargetedDelegate( this, _touchPriority, _swallowsTouches ); } }
void CCLayer::registerWithTouchDispatcher() { CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher(); if (m_pScriptHandlerEntry) { if (m_pScriptHandlerEntry->isMultiTouches()) { pDispatcher->addStandardDelegate(this,0); LUALOG("[LUA] Add multi-touches event handler: %d", m_pScriptHandlerEntry->getHandler()); } else { pDispatcher->addTargetedDelegate(this, m_pScriptHandlerEntry->getPriority(), m_pScriptHandlerEntry->getSwallowsTouches()); LUALOG("[LUA] Add touch event handler: %d", m_pScriptHandlerEntry->getHandler()); } return; } pDispatcher->addStandardDelegate(this,0); }
void BBAbstractSceneView::registerWithTouchDispatcher() { CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher(); pDispatcher->addStandardDelegate(this, m_nTouchPriority); }