Remove help and info from key list.
This commit is contained in:
parent
4dc7fbbf04
commit
0faa83c162
@ -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,7 +119,12 @@ void handle_event() {
|
|||||||
run = 0;
|
run = 0;
|
||||||
break;
|
break;
|
||||||
case ALLEGRO_EVENT_KEY_DOWN:
|
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;
|
break;
|
||||||
case ALLEGRO_EVENT_KEY_UP:
|
case ALLEGRO_EVENT_KEY_UP:
|
||||||
set_key(evnt.keyboard.keycode, 0);
|
set_key(evnt.keyboard.keycode, 0);
|
||||||
|
@ -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
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user