From a4c3ed545b6e7cc771590752608a56da2514314c Mon Sep 17 00:00:00 2001 From: Ben-G Date: Thu, 10 Jul 2014 21:24:12 -0700 Subject: [PATCH] only forward touch events if node has user interaction enabled --- cocos2d/CCResponderManager.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cocos2d/CCResponderManager.m b/cocos2d/CCResponderManager.m index 4151be9e1fd..2ac41114bb2 100644 --- a/cocos2d/CCResponderManager.m +++ b/cocos2d/CCResponderManager.m @@ -433,7 +433,13 @@ - (CCRunningResponder *)responderForTouch:(UITouch *)touch { for (CCRunningResponder *touchEntry in _runningResponderList) { - if (touchEntry.touch == touch) return(touchEntry); + if (touchEntry.touch == touch) { + CCNode *target = (CCNode *)touchEntry.target; + + if (target.userInteractionEnabled) { + return(touchEntry); + } + } } return(nil); }