We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
(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:
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.
I can reproduce this. It’s easy to notice when the items overlap.
Pull Request #3396: Fixing CCMenu’s Z ordering (https://github.com/cocos2d/cocos2d-x/pull/3396)