Page 1 of 1

Ability to check if game in focus

Posted: Sun Mar 24, 2013 11:33 pm
by Grey
Would be handy to have an ability to check if the game is in focus. Real-time modules could then auto-pause when unfocused, and ones with weird real-time sound engines could stop playing sound.

Re: Ability to check if game in focus

Posted: Thu Mar 28, 2013 9:37 pm
by darkgod
Done, you can now superload the Game:idling(focus) method.
Focus will be true if gaining focus, false if loosing it.
The default idling method also defines a game.has_os_focus field to remember the state