CCMenuItem order

CCMenuItem order
0.0 0


I agree with the last post, but this should be built-in behaviour. It is unnatural for the bottom item to have touch priority over the top one.


I had the same problem, maybe we need to submit a bug request so they change the code.


I’ve tried to change zOrder, change order of adding menuItems to menu layer - without any luck.

Update: Sorry, I’ve spoken too fast. Actually with cocos2dx 2.0.1 the first button that gets touch is the button with lowest zOrder, and it does not depend on order of adding buttons to menu. Specify explicit zOrder to addChild call and you’ll be good.


Yes, you are right but why !!! why lowest Z-order should get first.
Imagine you have two button that overlap each other . why touching common part should be handled with the one that is not being seen and is below !?
Isn’t that unfair ?

Any solution to inverse this behavior ?