nogame screen: bring back double-tap-to-exit on touch screens.

This commit is contained in:
Alex Szpakowski
2018-04-01 13:01:02 -03:00
parent 3a37300e6d
commit 3fe9e51a46
2 changed files with 28 additions and 0 deletions
+9
View File
@@ -3248,6 +3248,15 @@ function love.nogame()
g_frame_count = g_frame_count + 1
end
function love.mousepressed(x, y, b, istouch, clicks)
-- Double-tap the screen (when using a touch screen) to exit.
if istouch and clicks == 2 then
if love.window.showMessageBox("Exit No-Game Screen", "", {"OK", "Cancel"}) == 1 then
love.event.quit()
end
end
end
function love.resize()
create_world()
end