diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-08-07 13:07:38 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-08-07 13:07:38 (EDT) |
commit | b94641a84956bd45398980aad48ead89d0fcc275 (patch) | |
tree | 9d358a596f7c773dd6f8a046471d798036bd583c | |
parent | e07d97c9fe5920ebe5b375d8e292b865cec45ea3 (diff) | |
download | mazefight-b94641a84956bd45398980aad48ead89d0fcc275.zip mazefight-b94641a84956bd45398980aad48ead89d0fcc275.tar.gz mazefight-b94641a84956bd45398980aad48ead89d0fcc275.tar.bz2 |
menu: Handle escape key
-rw-r--r-- | src/menu.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -256,6 +256,13 @@ mf_menu(SDL_Renderer *renderer) switch (event.type) { case SDL_QUIT: goto quit; + case SDL_KEYDOWN: + switch (event.key.keysym.sym) { + case SDLK_ESCAPE: + goto quit; + default: + break; + } default: break; } |