Is there a way to tell when the window has been maximized (ie. the player has pressed the maximize button)? I want to change to borderless fullscreen when this happens.
Perhaps there should be a callback for this?
How do I tell when the window is maximized?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
-
- Party member
- Posts: 107
- Joined: Wed Oct 15, 2014 5:00 pm
- Location: Yorkshire, England
Re: How do I tell when the window is maximized?
The callback is love.resize(w, h), you get passed w and h which are the new size of the window.
Code: Select all
if not wearTheseGlasses() then
chewing_on_trashcan = true
end
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
Re: How do I tell when the window is maximized?
But is there a way of telling whether the player just resized the window manually or maximised it?pedrosgali wrote:The callback is love.resize(w, h), you get passed w and h which are the new size of the window.
- DeltaF1
- Citizen
- Posts: 64
- Joined: Mon Apr 27, 2015 4:12 pm
- Location: The Bottom of the Stack
- Contact:
Re: How do I tell when the window is maximized?
A bit of a hacky way to do it would be to check if the w and h are the same as the screen dimensions, then assume that they're pressed the maximize button.
Re: How do I tell when the window is maximized?
They won't be. Windows have borders.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: How do I tell when the window is maximized?
Why do you need to do this? Maybe there's another way. EDIT: Never mind, sort of missed the important part of the post. Carry on.
- georgeprosser
- Citizen
- Posts: 68
- Joined: Fri Mar 28, 2014 5:55 pm
Re: How do I tell when the window is maximized?
Well it looks like this is a missing feature so I posted a feature proposal on bitbucket.
Who is online
Users browsing this forum: No registered users and 19 guests