Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SpriteBatch and MenuItemSprite to share children #391

Open
totallyeviljake opened this issue Jan 21, 2014 · 1 comment
Open

Allow SpriteBatch and MenuItemSprite to share children #391

totallyeviljake opened this issue Jan 21, 2014 · 1 comment

Comments

@totallyeviljake
Copy link
Member

If a sprite has a parent as a sprite batch node and that sprite is used in a CCMenuItemSprite then it should not be drawn by the menu parent. Rather, it should be drawn in the sprite batch.

@totallyeviljake
Copy link
Member Author

The problem with SpriteBatch is that it draws sprites relative to its own z-order. This is where the global-Z-order concept from cocos2d-x v3 is useful. Without applying the sprite batch to a global z ordering, the sprites that would be in the menu would be occluded by other sprites that occur after the sprite batch node in the node hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant