Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How to toggle fullscreen mode and back?

Author
Message
MxM111
15
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 16th Oct 2009 08:29
If I use dbSetWindowOff or dbSetWindowOn then all the sprites that I already have drawn are screwed completely (sometimes they do not show at all, sometimes they show at position 0,0). How to toggle fullscreen mode on and off correctly?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 16th Oct 2009 09:57
you have to redraw all
MxM111
15
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 16th Oct 2009 16:21
But what does it mean redraw? I do not use commands from basic 2D so I do not understand what exactly I should "draw" in my 2D application. Do I have to re-create both dbImages and dbSprites, or just delete and create sprites, but images are fine?, or I can just have to move sprites or something (though moving does not work, I checked).
Drowneath
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location: In your eyes
Posted: 17th Oct 2009 15:07
Simple.



if(asleep) sheep++;
MxM111
15
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 19th Oct 2009 01:14
OK, I really need help. PLEASE HELP!!! This is the code that I have:


StartMenu is class that creates and draws my menu, it loads some images, creates some sprites, draws buttons using those sprites, sets up some variables for the function "MxMouseChecker::scanForMouseAction()". The later checks if mouse is clicked and then it changes the variable "GameMode" depending on what is clicked.

Interesting thing, that the program works if I put dbSetWindowOn instead of dbSetWindowOff (i.e. when I still delete and recreate menu, but I do not actually switch the window mode off).

But if I keep dbSetWindowOff, then it does switch to full screen, and even draws the menu, and even has some rudimentary functions (for example the button is highlighted when I mouse it over - functionality I programed through MxMouseChecker::scanForMouseAction() ) But if I click any of my buttons, including my button "Exit" that should set GameMode into GameModeExit or simply hit escape (which should end the program) then my program simply freeze, including vc++ itself, so I can not debug it - I have to kill the process through task manager.

Again, the program just works if I use dbSetWindowOn everywhere, which is useless for me, but it shows that my classes that are not shown here are written correctly, probably.

So, what do I miss here? PLEASE HELP, I AM GOING CRAZY WITH THIS.
MxM111
15
Years of Service
User Offline
Joined: 3rd Oct 2009
Location:
Posted: 19th Oct 2009 04:04
I think I found the issue. Inside while loop, "StartMenu*" should be removed.

Login to post a reply

Server time is: 2024-11-20 11:46:48
Your offset time is: 2024-11-20 11:46:48