From d8489f5c851a9be3083d28cc3717fa7dfa124fad Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 10 Sep 2016 23:08:57 +0200 Subject: [PATCH] Allow people to go back to the menu. --- tabakrolletjie/scenes/load_level.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tabakrolletjie/scenes/load_level.py b/tabakrolletjie/scenes/load_level.py index 4cf267b..6c219a0 100644 --- a/tabakrolletjie/scenes/load_level.py +++ b/tabakrolletjie/scenes/load_level.py @@ -54,8 +54,9 @@ class LoadLevelScene(BaseScene): def event(self, ev, gamestate): if ev.type == pgl.KEYDOWN: - if ev.key == pgl.K_l: - self._do_load("station_alpha.json", gamestate) + if ev.key in (pgl.K_q, pgl.K_ESCAPE): + from .menu import MenuScene + SceneChangeEvent.post(scene=MenuScene()) elif ev.type == pgl.MOUSEBUTTONDOWN: pressed = self._get_pressed(ev) if pressed: -- 2.34.1