DNESS / cocos2d-iphone

Automatically exported from code.google.com/p/cocos2d-iphone
1 stars 0 forks source link

[PATCH]Bugs about the visible of CCMenu and CCMenuItem #1064

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ricardoq...@gmail.com on 8 Feb 2011 at 1:29