DNESS / cocos2d-iphone

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

CCMenu should not block ccTouchBegan for disabled items #866

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
CCMenu currently returns an item even if the item is not enabled (disabled.) 
This should not be the 
case so that other layers could handle the touch. Optionally, for backward 
compatibility, this could 
be made into a feature setting for CCMenu (e.g. 
ignoreTouchOnNonInteractiveItems or perhaps 
something less verbose.)

I suggest adding the following after entry into the for loop in itemForTouch:

if (!item.isEnabled) {
    continue;
}

This problem is similar to issue #779, on which I commented.

Original issue reported on code.google.com by jszatm...@gmail.com on 16 May 2010 at 3:20

GoogleCodeExporter commented 9 years ago

Original comment by ricardoq...@gmail.com on 16 May 2010 at 10:23

GoogleCodeExporter commented 9 years ago
fixed in:
http://github.com/cocos2d/cocos2d-iphone/commit/4278398cf7ff2eee40925dcfc6e5203a
91763eae

Original comment by ricardoq...@gmail.com on 17 May 2010 at 2:11