Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,574 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Freeze the game when the window looses focus. #295556
10/26/09 04:13
10/26/09 04:13
Joined: Oct 2009
Posts: 33
A
AlexH Offline OP
Newbie
AlexH  Offline OP
Newbie
A

Joined: Oct 2009
Posts: 33
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?

Re: Freeze the game when the window looses focus. [Re: AlexH] #295574
10/26/09 08:45
10/26/09 08:45
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
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

Re: Freeze the game when the window looses focus. [Re: Oxy] #295713
10/27/09 03:29
10/27/09 03:29
Joined: Oct 2009
Posts: 33
A
AlexH Offline OP
Newbie
AlexH  Offline OP
Newbie
A

Joined: Oct 2009
Posts: 33
Thanks I believe its good now.

Re: Freeze the game when the window looses focus. [Re: AlexH] #295717
10/27/09 03:53
10/27/09 03:53
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
The 'window_focus' variable would probably be neater.

Re: Freeze the game when the window looses focus. [Re: DJBMASTER] #295718
10/27/09 04:07
10/27/09 04:07
Joined: Oct 2009
Posts: 33
A
AlexH Offline OP
Newbie
AlexH  Offline OP
Newbie
A

Joined: Oct 2009
Posts: 33
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...


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1