Available since LÖVE 0.9.0
This callback is not supported in earlier versions.
Called when the window is resized, for example if the user resizes the window, or if love.window.setMode
is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size.
love.resize( w, h )
Nothing.
Calls to love.window.setMode
will only trigger this event if the width or height of the window after the call doesn't match the requested width and height. This can happen if a fullscreen mode is requested which doesn't match any supported mode, or if the fullscreen type is 'desktop' and the requested width or height don't match the desktop resolution.
function love.resize(w, h) print(("Window resized to width: %d and height: %d."):format(w, h)) end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.resize