summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-19 10:45:00 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-19 10:45:00 (EDT)
commit68cbaa12b3308716b1cb6dac82b138da7d3cbe9c (patch)
tree399ef8bb138ff166cc5a210664c54f80b426e7e2
parent69e64e6ac4215c9cdbf19ce706fbaf2fd8d32a72 (diff)
downloaddodge-balls-68cbaa12b3308716b1cb6dac82b138da7d3cbe9c.zip
dodge-balls-68cbaa12b3308716b1cb6dac82b138da7d3cbe9c.tar.gz
dodge-balls-68cbaa12b3308716b1cb6dac82b138da7d3cbe9c.tar.bz2
help: Handle Esc and Enter
-rw-r--r--src/help.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/help.c b/src/help.c
index 39db3cb..71c2f35 100644
--- a/src/help.c
+++ b/src/help.c
@@ -28,6 +28,8 @@
const char *_db_help_text =
PACKAGE_NAME " version " PACKAGE_VERSION "\n"
"\n"
+ "Press Esc or Enter to exit help\n"
+ "\n"
"Evade the balls and get to the target! Dodge Balls is a simple "
"puzzle game with obstacle courses consisting of moving balls.\n"
"\n"
@@ -167,6 +169,11 @@ db_help(void)
text_src_rect.y = surface->h -
text_src_rect.h;
break;
+ case SDLK_ESCAPE:
+ case SDLK_RETURN:
+ case SDLK_KP_ENTER:
+ _db_help_quit = 1;
+ break;
default:
break;
}