I send this patch to fix the bugs about the property visible of CCMenu and
CCMenuItem.
Please look at the following examples:
1, A layer contains a menu, the menu is visible and the layer is invisible. So,
the menu wouldn't appear on screen, but it still accept touch events. To deal
with this matter, I create a method getGlobalVisible in CCNode. It consider the
visible of parent nodes. The method return YES only when one CCNode object is
visible and its parent node is visible.
2, A label style menu item contains a label. While I set the label object to
invisible, the property visible of menu item still return YES, so it still
accept touch events. The way to deal with this matter is override the method
visible to make it consider visible of the label it contained. . And the same
as sprite style menu item.
I'm sorry for my poor English. And I hope you can understand what I talk about!
Original issue reported on code.google.com by magicx...@gmail.com on 17 Dec 2010 at 2:59
Original issue reported on code.google.com by
magicx...@gmail.com
on 17 Dec 2010 at 2:59Attachments: