mirror of https://github.com/axmolengine/axmol.git
fix issue that ControlButton can't swallow touch event.
This commit is contained in:
parent
b095d5ec5b
commit
432ec49c88
|
@ -75,6 +75,7 @@ bool Control::init()
|
|||
|
||||
auto dispatcher = Director::getInstance()->getEventDispatcher();
|
||||
auto touchListener = EventListenerTouchOneByOne::create();
|
||||
touchListener->setSwallowTouches(true);
|
||||
touchListener->onTouchBegan = CC_CALLBACK_2(Control::onTouchBegan, this);
|
||||
touchListener->onTouchMoved = CC_CALLBACK_2(Control::onTouchMoved, this);
|
||||
touchListener->onTouchEnded = CC_CALLBACK_2(Control::onTouchEnded, this);
|
||||
|
|
Loading…
Reference in New Issue