Event for window losing focus?

BlitzPlus Forums/BlitzPlus Programming/Event for window losing focus?

matt!(Posted 2004) [#1]
Hi,

Is it possible to test and fire an event when the game window loses focus? I'd like to put my game in pause.

Any help appreciated!

Thanks.


Eikon(Posted 2004) [#2]
Try putting AutoSuspend 1 before your main loop and it should do it for you automatically.


soja(Posted 2004) [#3]
$2001 - App suspend
Generated when the user switches to another application.

$2002 - App resume
Generated when the user switches back to your application.


matt!(Posted 2004) [#4]
Thanks folks, AutoSuspend 1 works a treat!