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
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:
key_index = KEY_RESET;
break;
case ALLEGRO_KEY_H:
key_index = KEY_HELP;
break;
case ALLEGRO_KEY_I:
key_index = KEY_INFO;
break;
case ALLEGRO_KEY_F:
key_index = KEY_FULLSCREEN;
break;
@ -125,7 +119,12 @@ void handle_event() {
run = 0;
break;
case ALLEGRO_EVENT_KEY_DOWN:
set_key(evnt.keyboard.keycode, 1);
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);
break;
case ALLEGRO_EVENT_KEY_UP:
set_key(evnt.keyboard.keycode, 0);