KEYDOWN everywhere
authorStefano Rivera <stefano@rivera.za.net>
Tue, 13 May 2014 18:29:54 +0000 (20:29 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Tue, 13 May 2014 18:29:54 +0000 (20:29 +0200)
naja/scenes/credits.py
naja/scenes/game.py

index 67cb4e5a7045facdc7f20acf16d18f96a17c1b6e..415f0b9835410658b110a7967848199296684217 100644 (file)
@@ -32,7 +32,7 @@ class CreditsScene(Scene):
             box_width=100))
 
     def handle_scene_event(self, ev):
-        if ev.type == pgl.KEYUP and ev.key in KEYS.QUIT:
+        if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
             from naja.scenes.menu import MenuScene
             SceneChangeEvent.post(MenuScene)
             return
index 5b24347a4670c2ba572fb1cc66377d8689c38ed9..0d35b7b24a017b43a7492ed98c84f1a2fa4a5cda 100644 (file)
@@ -29,6 +29,6 @@ class GameScene(Scene):
 
     def handle_scene_event(self, ev):
         from naja.scenes.menu import MenuScene
-        if ev.type == pgl.KEYUP and ev.key in KEYS.QUIT:
+        if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
             SceneChangeEvent.post(MenuScene)
             return