views:

7

answers:

0

I've got a problem with registering touches in cocos2d game. Generally they work well with my layer (scene), however, when it is displayed after the OpenFeint dialog, the touches are not coming through.

The touches are enabled in onEnter:

-(void) onEnter {
    [super onEnter];

    self.isTouchEnabled = YES;

    [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self
                                                     priority:0
                                              swallowsTouches:YES];
}

In the app delegate I have the following functions to handle OpenFeint events:

-(void) dashboardWillAppear {
    [GameScene pauseGame];
    [[CCDirector sharedDirector] pause];
}    

-(void) dashboardWillDisappear {
    [[CCDirector sharedDirector] resume];
}

Looks like that I need to call onExit and onEnter along with pause/resume of the director, however it does not look right for me, as for some scenes I have some animations running in onEnter

Any ideas how should it work? Or is it a bug in cocos2d?