From 44f1b94b6ea914a9c678810b4ee644bc674f822a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 1 Jun 2016 08:49:45 +0200 Subject: [PATCH] Also allow to open help file with F1 --- dat/d/helpfile.txt | 6 +++--- src/help.c | 2 +- src/levelblit.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dat/d/helpfile.txt b/dat/d/helpfile.txt index 5ec62a3..c24ccfa 100644 --- a/dat/d/helpfile.txt +++ b/dat/d/helpfile.txt @@ -10,7 +10,7 @@ To navigate this help file, use the [up] and [down] arrow keys, or press the [PgUp]/[PgDn] or [Home]/[End] keys to navigate quickly. Press [Enter] to activate links. Press [Backspace] to quickly return to this help index. Press [Esc] to close this help. You can access -this help file at any time by pressing [H]. +this help file at any time by pressing [F1] or [H]. !Table of Contents @@ -148,10 +148,10 @@ Tab - View the map. P - Pause the game. -H - View the help file. - I - View the list of collected artifacts. +F1 or H - View the help file. + F2 - Toggle sound effects. F3 - Toggle music. diff --git a/src/help.c b/src/help.c index ece8d95..4c47c54 100644 --- a/src/help.c +++ b/src/help.c @@ -455,7 +455,7 @@ int MoveCursor() if (ev.key.keysym.sym == SDLK_ESCAPE) { return 0; } - if (ev.key.keysym.sym == SDLK_h) { + if (ev.key.keysym.sym == SDLK_h || ev.key.keysym.sym == SDLK_F1) { return 0; } if (ev.key.keysym.sym == SDLK_i) { diff --git a/src/levelblit.c b/src/levelblit.c index 6f71766..6383ecc 100644 --- a/src/levelblit.c +++ b/src/levelblit.c @@ -1484,6 +1484,7 @@ void HandleEvents() ActionToggleMap(); break; case SDLK_h: + case SDLK_F1: ActionShowHelp(); break; case SDLK_i: @@ -2850,7 +2851,7 @@ void PrintStatusMessage() if(statusmessage != 0) { if (statusmessagetimer > 0) { switch(statusmessage) { - case 1: sprintf(message, "Press [H] to open the help file."); break; + case 1: sprintf(message, "Press [F1] to open the help file."); break; case 2: sprintf(message, "This compass points towards interesting rooms (See help to learn more)."); break; case 3: sprintf(message, "This storage chest is empty."); break; case 10: sprintf(message, "Music enabled."); break; -- 2.11.4.GIT