From 388c93b04935ce00c7a0f1358bc95087a209c2dc Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 1 Apr 2018 15:05:39 -0300 Subject: [PATCH] nogame screen: escape key quits love. --- src/scripts/nogame.lua | 6 ++++++ src/scripts/nogame.lua.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/src/scripts/nogame.lua b/src/scripts/nogame.lua index 9c77daf4b..aa5073485 100644 --- a/src/scripts/nogame.lua +++ b/src/scripts/nogame.lua @@ -3257,6 +3257,12 @@ function love.nogame() end end + function love.keypressed(key) + if key == "escape" then + love.event.quit() + end + end + function love.resize() create_world() end diff --git a/src/scripts/nogame.lua.h b/src/scripts/nogame.lua.h index a38fc9f14..bc6195a1f 100644 --- a/src/scripts/nogame.lua.h +++ b/src/scripts/nogame.lua.h @@ -11986,6 +11986,14 @@ const unsigned char nogame_lua[] = 0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a, + 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6b, 0x65, 0x79, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x28, 0x6b, 0x65, 0x79, 0x29, 0x0a, + 0x09, 0x09, 0x69, 0x66, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x65, 0x73, 0x63, 0x61, 0x70, + 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, + 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x74, + 0x28, 0x29, 0x0a, + 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, + 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x0a, 0x09, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x28, 0x29, 0x0a,