Remove help and info from key list.

This commit is contained in:
Nicolás Ortega Froysa 2018-03-25 17:04:14 +02:00
parent 4dc7fbbf04
commit 0faa83c162
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF
2 changed files with 8 additions and 11 deletions

View File

@ -95,12 +95,6 @@ void set_key(int keycode, int value) {
case ALLEGRO_KEY_R: case ALLEGRO_KEY_R:
key_index = KEY_RESET; key_index = KEY_RESET;
break; break;
case ALLEGRO_KEY_H:
key_index = KEY_HELP;
break;
case ALLEGRO_KEY_I:
key_index = KEY_INFO;
break;
case ALLEGRO_KEY_F: case ALLEGRO_KEY_F:
key_index = KEY_FULLSCREEN; key_index = KEY_FULLSCREEN;
break; break;
@ -125,6 +119,11 @@ void handle_event() {
run = 0; run = 0;
break; break;
case ALLEGRO_EVENT_KEY_DOWN: case ALLEGRO_EVENT_KEY_DOWN:
if(evnt.keyboard.keycode == ALLEGRO_KEY_H)
show_help = !show_help;
else if(evnt.keyboard.keycode == ALLEGRO_KEY_I)
show_info = !show_info;
else
set_key(evnt.keyboard.keycode, 1); set_key(evnt.keyboard.keycode, 1);
break; break;
case ALLEGRO_EVENT_KEY_UP: case ALLEGRO_EVENT_KEY_UP:

View File

@ -24,10 +24,8 @@ enum {
KEY_LEFT = 0x2, KEY_LEFT = 0x2,
KEY_RIGHT = 0x3, KEY_RIGHT = 0x3,
KEY_RESET = 0x4, KEY_RESET = 0x4,
KEY_HELP = 0x5, KEY_FULLSCREEN = 0x5,
KEY_INFO = 0x6, KEY_MAX = 0x6
KEY_FULLSCREEN = 0x7,
KEY_MAX = 0x8
}; };
/** /**