Allow people to go back to the menu.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 21:08:57 +0000 (23:08 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 21:08:57 +0000 (23:08 +0200)
tabakrolletjie/scenes/load_level.py

index 4cf267b0f2ba264cc5d8fa454bf45516b0a1e096..6c219a00338cf85c1c5f89b77220943c61c46afe 100644 (file)
@@ -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: