Encode keys higher up

This commit is contained in:
simon.kagstrom 2009-12-26 12:19:35 +00:00
parent e2b34f1ee9
commit 2c359032c2
2 changed files with 11 additions and 11 deletions

View File

@ -12,7 +12,7 @@ widget.oo: widget.cpp widget.hh
gui.oo: gui.cpp gui.hh Makefile font.hh menu.hh sdl_ttf_font.hh \
dialogue_box.hh help_box.hh main_menu.cpp disc_menu.cpp \
file_browser.hh timer.hh game_info.hh
file_browser.hh timer.hh game_info.hh widget.hh
virtual_keyboard.oo: virtual_keyboard.hh virtual_keyboard.cpp widget.hh

View File

@ -4,16 +4,16 @@
#include <SDL.h>
enum key_event {
EVENT_NONE = 0,
KEY_UP = 1,
KEY_DOWN = 2,
KEY_LEFT = 4,
KEY_RIGHT = 8,
KEY_SELECT = 16,
KEY_ESCAPE = 32,
KEY_PAGEDOWN = 64,
KEY_PAGEUP = 128,
KEY_HELP = 256,
EVENT_NONE = (1 << 8),
KEY_UP = (1 << 9),
KEY_DOWN = (1 << 10),
KEY_LEFT = (1 << 11),
KEY_RIGHT = (1 << 12),
KEY_SELECT = (1 << 13),
KEY_ESCAPE = (1 << 14),
KEY_PAGEDOWN = (1 << 15),
KEY_PAGEUP = (1 << 16),
KEY_HELP = (1 << 17),
};
typedef enum key_event event_t;