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 almost 3 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.

Comments:

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 (https://github.com/cocos2d/cocos2d-x/pull/3396)

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

Status:Rejected
Start date:2013-08-23
Priority:Normal
Due date:
Assignee:-
% Done:

0%

Category:all
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.