Skip to content

Commit

Permalink
Merge pull request cocos2d#15047 from Zzzen/v3
Browse files Browse the repository at this point in the history
Let ScrollView swallow touch events by default.
  • Loading branch information
zilongshanren committed Feb 15, 2016
2 parents cb60561 + 07051a0 commit 79e7706
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions extensions/GUI/CCScrollView/CCScrollView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 79e7706

Please sign in to comment.