Ability to check if game in focus

Moderator: Moderator

Post Reply
Message
Author
Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Ability to check if game in focus

#1 Post 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.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Ability to check if game in focus

#2 Post 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
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply