Page 1 of 1
Is it possible to make the window start as maximized?
Posted: Tue Jun 14, 2016 5:07 pm
by omegazion
I can maximize the window by calling love.window.maximize() but doing so will make it first appear in a smaller window when it starts up before it maximizes.
Is it possible to set the window to start maximized in conf.lua?
(Or maybe at least hide the window at first and show it once it's maximized.)
Thanks.
Re: Is it possible to make the window start as maximized?
Posted: Tue Jun 14, 2016 8:03 pm
by alloyed
It doesn't look like it, even though SDL_CreateWindow() can make maximized/minimized windows.
You can probably file an issue for it, it wouldn't take that much work:
https://bitbucket.org/rude/love/issues
Re: Is it possible to make the window start as maximized?
Posted: Wed Jun 15, 2016 6:31 pm
by pedrosgali
Try adding
t.window.fullscreen = true
t.window.fullscreentype = "exclusive"
To your conf.lua.
Edit: I'd add a link to the wiki page but I'm at work on my phone. Hope this helps.
Re: Is it possible to make the window start as maximized?
Posted: Wed Jun 15, 2016 7:07 pm
by zorg
Except fullscreen is not "maximized". Also, using exclusive fullscreen at startup is worse than kicking puppies, don't do that.
Clarification: People with multi-monitor setups will hate your guts since it can mess up the desktop layout; just use desktop fullscreen if you must, but again, not right from the start.
Now, this might or might not work, haven't tested it:
Set t.window = false in love.conf, then use [wiki]love.window.getDesktopDimensions[/wiki] to get the size of the current display, and finally [wiki]love.window.setMode[/wiki] to set the window size to that.
Re: Is it possible to make the window start as maximized?
Posted: Wed Jun 15, 2016 7:20 pm
by pedrosgali
I see now, misinterpreted the OP.