Projects > cpp > Issues > Bug #2711

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

CCMenu Issue

Bug #2711 [Rejected]
godyZ 2013-08-23 08:06 . Updated about 10 years ago

(valentiplunge opened this issue 2 months ago in github)

I created a CCMenu object and added some CCMenuItems as children with Z increasing in every CCMenuItem, something like:

addChild(CCMenuItem, 1)
addChild(CCMenuItem, 2)

But when I touched them the priority was inverted, when I touched the CCMenuItem with z:2 I activated the CCMenuItem with z:1. For additional information the first CCMenuItem was a background and the second one was a button over it. I looked up in the code of CCMenu and I think it is fault of a CCARRAY_FOREACH that should be CCARRAY_FOREACH_REVERSE.

Thank you.


metalbass commented:
I can reproduce this. It’s easy to notice when the items overlap.

metalbass referenced:
Pull Request #3396: Fixing CCMenu’s Z ordering (

WenHai 2014-01-08 10:28
  • Status changed from New to Rejected

We use new EventDispatcher for touch event dispatcher,it dispatch by z order.

zhangxm 2014-01-09 06:01
  • Target version deleted (Candidate)

Atom PDF

Start date:2013-08-23
Due date:
% Done:


Target version:-