From: Stefano Rivera Date: Tue, 13 May 2014 18:29:54 +0000 (+0200) Subject: KEYDOWN everywhere X-Git-Tag: 0.1~327 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=a99e4ae79d235b6047625fb1de2559f66b3a7562;p=naja.git KEYDOWN everywhere --- diff --git a/naja/scenes/credits.py b/naja/scenes/credits.py index 67cb4e5..415f0b9 100644 --- a/naja/scenes/credits.py +++ b/naja/scenes/credits.py @@ -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 diff --git a/naja/scenes/game.py b/naja/scenes/game.py index 5b24347..0d35b7b 100644 --- a/naja/scenes/game.py +++ b/naja/scenes/game.py @@ -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