From: Simon Cross Date: Sat, 10 Sep 2016 21:08:57 +0000 (+0200) Subject: Allow people to go back to the menu. X-Git-Tag: tabakrolletjie-v1.0.0~38 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=d8489f5c851a9be3083d28cc3717fa7dfa124fad;p=tabakrolletjie.git Allow people to go back to the menu. --- 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: