Hi,
I am porting a game from Cocos 0.7 to 0.9 and I am having some trouble with touches.
I have a layer for the settings menu. It should swallow all touches when visible and no touches when not visible (so that the player won't click on game elements while the menu is on screen).
In 0.7 I had code like this:
- (BOOL) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
if(self.visible)
{
return kEventHandled;
}
else
{
return kEventIgnored;
}
}
But in 0.9 the touch event functions are void functions. How do I get the behavior I had in 0.7 in 0.9 ?
Thanks.