Full Screen/Windowed Mode
BlitzMax Forums/BlitzMax Beginners Area/Full Screen/Windowed Mode
| ||
Has anyone got an example of a game that can run in full-screen and windowed and when in windowed mode it accepts close, minimise, loss of focus etc? I ask because I did all this in blitz plus for my Bonus games and it was a pain and I'd really like to save time on this, as all pro games must have these capabilities. thanks in advance. |
| ||
By 'windowed mode' are we talking MaxGUI? |
| ||
From the code archives, how to create windowed mode w close/min http://www.blitzmax.com/codearcs/codearcs.php?code=1595 |
| ||
Assari was faster than me... ;) Hope this code does what you need. If not please reask, as I'm not quite sure what you mean. |
| ||
thanks, I'll check that out. What I mean is I want to write one set of game code that runs the same in full-screen OR windowed mode. If you have a game, it normally launches in full-screen mode but the user can choose to change to windowed mode and the game should be the same. I don't need windowed mode for a GUI app, it's for a game. I achieved this in BlitzPLus by calling graphics and then using API calls to add on a close button and minimise button etc. Grisu: Yeah that's 100% what I needed thanks (i.e. call to graphics, then code can still use Flip), hours of hair pulling saved. a ctually you did it pretty much like I did in BlitzPlus. |
| ||
ooh, Grisu, the only thing is your code is 100% NON-Mac compatible right? So how can the same thing be achieved on a mac? |
| ||
I would like to know how to do this cross-platform as well. |
| ||
I'm no mac guru. But you should be able with the help of the MAXGUI module! EVENT_WINDOWSIZE: Switch fullscreen when app is resized in any way EVENT_APPTERMINATE or EVENT_WINDOWCLOSE: End the app App_suspended(): App is in minimized state / idle loop Get my idea? |
| ||
Hmm, uh, maybe I'll ask Indiepath, bet he's done it. It's just I need to make sure mac users can run the game full-screen or windowed mode and that I can still draw graphics and call Flip etc, I don't want it to be event an event driven GUI or something yet I do need to respond to those events you listed. |
| ||
You don't need a bmxgui in your game. You can just use these commands and everything else as a normal app. |
| ||
ok, thanks, problem is I don't have a Mac to test on!! |
| ||
Me too. :( Ask Tim, perhaps he knows more... :) |