iOSOrientationLandscape 0.8.0 example: lostFocus() should not stop glView animation

Hi…,

when lostFocus() stops my game, the glView animation should not stop, because I still want to draw an pause information on screen.

How to continue glView animation, even when lostFocus() is called?

Thanks

Michael

Hi Michael,

Yes, in OF we just get the lostFocus notification, which is based on the iOS applicationWillResignActive callback.

In ofxiOSAppDelegate.mm:

- (void)applicationWillResignActive:(UIApplication *)application {
    [ofxiOSGetGLView() stopAnimation];
	
	ofxiOSAlerts.lostFocus();
}

I guess you could hack that to add an extra alert before the stopAnimation… but maybe it would be neater and more reliable to instead concentrate on a neat state when returning with gotFocus (e.g. in paused state waiting for user to confirm resumption) - depends on your app, I guess…

Hi Gwydion,

thank you for your help. When I have the time, I will take a look at this again.

Thanks

Michael