New issue
 Projects > cocos2d-x > Issues > Bug #4307

Version 3.0beta2 : If we add MenuItem into ScrollingView, list can not be scrolled when touch is on MenuItem

Bug #4307 [New]
DipankarDas 2014-03-08 00:03 . Updated almost 11 years ago

If we add MenuItem into ScrollingView, list can not be scrolled when touch is on MenuItem.

This is caused as Menu has event listener with swallow touch as TRUE.
It could be a desirable feature but i really think developer should be given option to control if the touch is swallowed or not.

I made minor change to class Menu and this issue can be solved. Please find my modified Menu class file. Look for addTouchEvent() which i am keeping virtual allowing subclasses to override it.

CCMenu.h - Look for addTouchEvent() (4.9 kB) DipankarDas, 2014-03-08 00:03

CCMenu.cpp - Look for addTouchEvent() (13.5 kB) DipankarDas, 2014-03-08 00:03

dumganhar 2014-03-08 03:23

Thanks for your feedback. The patch is good to me. I will apply it.
BTW, I think we should rename addTouchEvent to addTouchEventListener.

dumganhar 2014-03-08 03:24
  • Assignee set to dumganhar
  • Priority changed from Low to Normal
DipankarDas 2014-03-10 03:05

Thank you for your prompt request.

Atom PDF

Status:New
Start date:2014-03-07
Priority:Normal
Due date:
Assignee:dumganhar
% Done:

0%

Category:all
Target version:-
Estimated time:0.10 point