Loose Focus on runtime window

BlitzMax Forums/BlitzMax Beginners Area/Loose Focus on runtime window

Dibble(Posted 2010) [#1]
Hi
a few questions for your expert advice

1) I was wanting to pause my blitzmax game when the user clicks on
the desktop or any other event which causes the blitzmax runtime
window loosing focus.

I dont have MaxGUI so would I need to purchase this addition to biltzmax?

2) was also wanting to close the program using the top right 'X' close gadget. will I need MaxGUI to implement this?

3) Also add a graphic to the top left of the runtime window.

Thanks
Dibble


matibee(Posted 2010) [#2]
1) Not sure.

2) No. When the user clicks the x, AppTerminate() will be true

While Not AppTerminate()
Cls
' etc
Flip
Wend


3) You mean onto the title bar of the window frame?


Zeke(Posted 2010) [#3]
1. AppSuspended()


Vagary Labs(Posted 2010) [#4]
I've tried using AppSuspended in Linux, but it doesn't seem to work. Does it work in Windows or OS X?


Dibble(Posted 2010) [#5]
thanks

yep adding a graphic/icon to the title bar of the window frame.


Zeke(Posted 2010) [#6]
title bar icon:
http://blitzmax.com/Community/posts.php?topic=86083


Dibble(Posted 2010) [#7]
Thanks for that lots of examples very useful


Dibble(Posted 2010) [#8]
this was the most useful
http://www.blitzbasic.com/codearcs/codearcs.php?code=1841

use the ccSetIcon after your set graphics.


GfK(Posted 2010) [#9]
I use this solution (Windows), which works brilliantly. Seems complicated at first but once you've done the initial setup as described (which takes a couple of minutes), you're away.