But I found this weird because..: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.
Code: Select all
-- This won't trigger rs.resize because default window is 800x600
-- so this makes sense?
love.window.setMode(800, 600, {resizable = true})
-- Now let's change window to 1024x600.
-- And... love.resize still didn't triggered...
love.window.setMode(1024, 600, {resizable = true})
love.resize = function()
print("Resized!")
end
Doing as wiki says, calling with "unsupported" arguments indeed triggers love.resize:
Code: Select all
love.window.setMode(0, 0, {resizable = true})