Freeze the game when the window looses focus.

Posted By: AlexH

Freeze the game when the window looses focus. - 10/26/09 04:13

I know of the on_minimized/on_maximize callbacks, however, is there a callback that is triggered when the window looses focus so I can automatically pause the game?
Posted By: Oxy

Re: Freeze the game when the window looses focus. - 10/26/09 08:45

not shure, but try to look into;

http://www.conitec.net/beta/on_message.htm

on_message functions,
there you should be able to grab the unfocus event
Posted By: AlexH

Re: Freeze the game when the window looses focus. - 10/27/09 03:29

Thanks I believe its good now.
Posted By: DJBMASTER

Re: Freeze the game when the window looses focus. - 10/27/09 03:53

The 'window_focus' variable would probably be neater.
Posted By: AlexH

Re: Freeze the game when the window looses focus. - 10/27/09 04:07

Yes but, its just a variable so I'd have to check it every frame... (which I might end up doing if my post here isn't resolved).

So I could use the WM_SETFOCUS and WM_KILLFOCUS messages to check for that...
© 2023 lite-C Forums