Skip to content

Commit

Permalink
nogame screen: escape key quits love.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Apr 1, 2018
1 parent 3fe9e51 commit 388c93b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scripts/nogame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/scripts/nogame.lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 388c93b

Please sign in to comment.