summaryrefslogtreecommitdiff
path: root/src/screen/screen_choiceArena.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen/screen_choiceArena.c')
-rw-r--r--src/screen/screen_choiceArena.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/screen/screen_choiceArena.c b/src/screen/screen_choiceArena.c
index 969c350..7bc6ce4 100644
--- a/src/screen/screen_choiceArena.c
+++ b/src/screen/screen_choiceArena.c
@@ -9,6 +9,7 @@
#include "interface.h"
#include "screen.h"
#include "image.h"
+#include "hotKey.h"
#ifndef NO_SOUND
# include "music.h"
@@ -31,11 +32,18 @@ static widget_t *button_back;
static list_t *listWidgetButtonimage;
static arenaFile_t *currentArena;
+static void hotkey_escape()
+{
+ setScreen("gameType");
+}
+
void startScreenChoiceArena()
{
#ifndef NO_SOUND
playMusic("menu", MUSIC_GROUP_BASE);
#endif
+
+ registerHotKey(SDLK_ESCAPE, hotkey_escape);
}
void drawScreenChoiceArena()
@@ -72,6 +80,7 @@ void eventScreenChoiceArena()
void stopScreenChoiceArena()
{
+ unregisterHotKey(SDLK_ESCAPE);
}
static void eventWidgetButtonImage(void *p)