Fullscreen problem in 0.9.2
Posted: Sat Jul 04, 2015 9:31 am
Hello! i'am making game in Love2d 0.9.2 (Ubuntu 14.04). But i have a problem. i want if game window is not fullscreen, then you can go to fullscreen pressing "f". But if you are already in fullscreen mode, then you can go to normal window mode pressing "f" key again.
Here are my code:
When i run that code, it just opens normal window where are my game and enters fullscreen pressing "f" but if i press "f" again, then it does not exit fullscreen mode.
Please help me!!! And sorry my very bad english. i am from finland an 10 yo
Here are my code:
Code: Select all
function love.update(dt)
if love.keyboard.isDown("f") then
love.window.setFullscreen(true, "desktop")
elseif love.keyboard.isDown("f") then
love.window.setFullscreen(false, "desktop")
end
When i run that code, it just opens normal window where are my game and enters fullscreen pressing "f" but if i press "f" again, then it does not exit fullscreen mode.
Please help me!!! And sorry my very bad english. i am from finland an 10 yo