Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Resize the window
- - By danikaze Date 2011-08-02 16:04
Is there any way to resize the window?

Graphics.setResolution(width, height) only changes the virtual size, but not the window size.
Will be there any Window.setResolution(w, h) or you need to re-create it again (unloading and loading all the sprites..)

Anyway, I tried to re-create the window and it failed the 2nd time the window it's created.

This option is not required, but is a nice option to configure the game if you play in windowed mode.
Parent - - By Jwosty Date 2011-08-02 16:22
I'm pretty sure that you can't resize it after initialization, but you could have a window size option in a settings menu, but the user would have to restart the application. Download wrath to see what I mean. Or, you could somehow make a setup where your program would auto-close the window, and then reopen a new one with the correct size. But for that, all images and sounds would have to be re-created as well. One last thing: you maaaaaybe could try calling the window's :initialize method again... Just thought of that...

Anyway, hope this helps! ;)
Parent - - By danikaze Date 2011-08-02 20:00
Yeah, I know what you mean and that was my first alternative ("You have to restart the game to apply changes") :P

I tried closing the window and creating it again, but then I have some weird error :P
Parent - - By Jwosty Date 2011-08-03 22:06
Error? That might be because you had the window close itself... xP
Parent - - By Maverick Date 2011-08-03 23:55
Is it possible to create TWO windows?
Parent - - By Jwosty Date 2011-08-04 03:49
Not at the same time
Parent - - By jlnr (dev) Date 2011-08-04 08:15
And in Ruby, there is no way to guarantee that the old window has been freed. But, I think even having two Windows one after another is not really supported on all platforms.

If you need resolution changes NOW, you should fork, update, and extend the glfw branch of Gosu on github :)
Parent - By danikaze Date 2011-08-17 23:26
Well, I think I'll pass for now. I don't need it urgently ;)
There's other more important things to develop right now, but thanks anyway!
Up Topic Gosu / Gosu Exchange / Resize the window

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill