I would like an update please on this issue - how AppGameKit Tier1 peeps can see whether or not the application is currently in focus. There is already an issue posted at
http://code.google.com/p/agk/issues/detail?id=96, but I wanted to get a response from here on the forum.
What I read in other posts is that this might be too needlessly complicated for Tier1, but I wholeheartedly disagree.
All that is needed is a Getter value that returns a 0 or 1 if the application was interrupted. Check the getter each frame, and if it returns 0, do XXX, if it returns 1, do YYY.
For example:
do
tInterrupt as integer
tInterrupt = WasApplicationInterrupted()
rem if tInterrupt equals 1, then AGK lost focus at some point
if tInterrupt = 1
rem do code to pause game
endif
rem gamecode here....
sync()
loop
Just like MousePressed or MouseReleased. The variable returns a value of 1 for a single frame only, and returns to 0 afterwards.
EDIT: I believe that this should be a feature included in the next release in AGK.
It is that important - nowadays, when a game is interrupted by external forces (phonecall on a phone, dead batteries in a Wii/PS3/360 controller) the game MUST go to pause mode. Not having this feature is... ludicrous.
EDIT2: I'm not trying to come off as completely angry. My app development has been smooth sailing so far, but I feel like I can't ship an app (especially with mine that is so timer-based) where the user will be caught off guard if the clock starts ticking again once the app resumes.
Hi there. My name is Dug. I have just met you, and I love you.