Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Toggle full screen
- - By victords Date 2014-10-04 15:36

I'd like to know whether there's a way to toggle the full screen mode in Ruby version...
Sorry if there's already some post on this subject, but I couldn't find it in Google, so I supposed there isn't =P

Thanks in advance!
Parent - - By lol_o2 Date 2014-10-04 16:33
You can toggle full-screen by creating new window. Remember to close the current one.

And for searching on forum, use internal search not Google.
Parent - - By victords Date 2014-10-04 17:50
Hi, thanks for the answer!
I haven't found the link for the internal search before, now I'm aware of it. =P

Anyway, when I tried the strategy you suggested, the graphics in the new window "crash" suddenly, a little after it has been created. However, my game is already somewhat complex, so I think this problem could be related to references to the older window (because all images have to be given a reference to the window when loaded)...
I'll try to clean up all references to see if it solves the problem.

Thanks again!
Parent - By jahmaican Date 2014-10-04 18:46
You could try to store the Window object in a global variable (well, it might not be something you should do, but it's the simplest solution to try), change all the references to this and then replace it with a new instance when needed. But then, it still may or may not work properly, depending on your system and myriad other things, as stated with a sad face here.
Parent - By jlnr (dev) Date 2014-10-09 05:30
Not yet. Gosu 0.8 has made it a lot easier to add this later, as all Window implementations are now based on the SDL 2 library, which has support for this (AFAIK). Feel free to file a github issue for this, that's where I usually go when I have spare time :)
Up Topic Gosu / Gosu Exchange / Toggle full screen

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill