I'm making my first iphone game using cocos2d and box2d. I just implemented a pause button. It brings up a pause menu on top of the game and pauses CCDirector. Pausing and unpausing works great as long as you stay in the app but there's a bug. If you minimize the app while it's paused and come back to it, the game is unpaused again but the pause menu is still in front of it. The reason appears to be that the applicationDidBecomeActive method in AppDelegate.mm looks as follows:I'm making my first iphone game using cocos2d a