mirror of https://github.com/axmolengine/axmol.git
Let ScrollView swallow touch events by default.
This commit is contained in:
parent
eb55a0e603
commit
07051a0357
|
@ -190,6 +190,7 @@ void ScrollView::setTouchEnabled(bool enabled)
|
|||
if (enabled)
|
||||
{
|
||||
_touchListener = EventListenerTouchOneByOne::create();
|
||||
_touchListener->setSwallowTouches(true);
|
||||
_touchListener->onTouchBegan = CC_CALLBACK_2(ScrollView::onTouchBegan, this);
|
||||
_touchListener->onTouchMoved = CC_CALLBACK_2(ScrollView::onTouchMoved, this);
|
||||
_touchListener->onTouchEnded = CC_CALLBACK_2(ScrollView::onTouchEnded, this);
|
||||
|
|
Loading…
Reference in New Issue