Love resize error
Posted: Mon Dec 16, 2019 3:06 pm
First, hello to everyone.
I tried to resize the window width based on the height, but I can't get the expected result, love looses the mouse click when resized
this happens because setMode call resize again.
The function i would need would be something like "ResizeEnd"
sorry for Translation by google
edit 1 :
setMode needs to be called only once, after finishing resizing, I tried using mouseRelease to check if resizing is complete, but mouseRelease only captures the click inside a game window
I tried to resize the window width based on the height, but I can't get the expected result, love looses the mouse click when resized
this happens because setMode call resize again.
The function i would need would be something like "ResizeEnd"
Code: Select all
function game.resize(w, h)
aux = width/height
--This not works to resize width only
love.window.width = aux * h
--This code cancel resize, releasing mouse
love.window.setMode(aux * h, h, {resizable=true, vsync=true, minwidth=400, minheight=300})button
end
sorry for Translation by google
edit 1 :
setMode needs to be called only once, after finishing resizing, I tried using mouseRelease to check if resizing is complete, but mouseRelease only captures the click inside a game window