Is it possible to make the window start as maximized?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
omegazion
Prole
Posts: 8
Joined: Sat Jan 08, 2011 3:33 pm

Is it possible to make the window start as maximized?

Post 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. :)
alloyed
Citizen
Posts: 80
Joined: Thu May 28, 2015 8:45 pm
Contact:

Re: Is it possible to make the window start as maximized?

Post 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
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Is it possible to make the window start as maximized?

Post 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.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Is it possible to make the window start as maximized?

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
pedrosgali
Party member
Posts: 107
Joined: Wed Oct 15, 2014 5:00 pm
Location: Yorkshire, England

Re: Is it possible to make the window start as maximized?

Post by pedrosgali »

I see now, misinterpreted the OP.

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 83 guests