krzysztofzablocki / CCNode-SFGestureRecognizers

Adding UIGestureRecognizers to cocos2d, painless.
http://twitter.com/merowing_
Other
202 stars 34 forks source link

Multi layer support #5

Closed ngoccuong291 closed 11 years ago

ngoccuong291 commented 11 years ago

Hi Krzysztof

Thanks for creating a great library for handling gesture on Cocos2d.

I'm having a situation where I have to enable gesture for a layer under another layer.

Your library works fine with one layer but I couldn't figure out a way to make it working for the layer under another one.

Could you provide me some guidelines on this matter?

Thanks so much Leon

ngoccuong291 commented 11 years ago

I found the issue, it had nothing to do with how many layer you have in your game, it has something to do with the CCMenu. If you add CCMenu on your layer, the gesture recogniser will stop working. There are two ways to overcome this issue, you can either:

Thanks again for creating this great library Leon

ngoccuong291 commented 11 years ago

Another simple solution could be to set contentSize = CGSizeZero of CCMenu