From 2c359032c281594972757a117ac48c77000762b1 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 26 Dec 2009 12:19:35 +0000 Subject: [PATCH] Encode keys higher up --- Makefile | 2 +- widget.hh | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 7bd5202..aa33d05 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/widget.hh b/widget.hh index 23881be..a2b60db 100644 --- a/widget.hh +++ b/widget.hh @@ -4,16 +4,16 @@ #include 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;