diff pytouhou/ui/anmrenderer.py @ 238:0e1762b1ab9f

Fix ANM interrupts
author Thibaut Girka <thib@sitedethib.com>
date Sun, 01 Jan 2012 20:23:00 +0100
parents cbe9dbd80dfb
children 901489c21d19
line wrap: on
line diff
--- a/pytouhou/ui/anmrenderer.py
+++ b/pytouhou/ui/anmrenderer.py
@@ -116,8 +116,10 @@ class ANMRenderer(pyglet.window.Window, 
         elif symbol == pyglet.window.key.TAB:
             self.toggle_sprites()
         elif symbol >= pyglet.window.key.F1 and symbol <= pyglet.window.key.F12:
-            print (symbol - pyglet.window.key.F1 + (12 if modifiers == pyglet.window.key.MOD_CTRL else 0) + 1)
-            #self._anmrunner.interrupt(symbol - pyglet.window.key.F1 + (12 if modifiers == pyglet.window.key.MOD_CTRL) + 1)
+            interrupt = symbol - pyglet.window.key.F1 + 1
+            if modifiers == pyglet.window.key.MOD_CTRL:
+                interrupt += 12
+            self._anmrunner.interrupt(interrupt)
 
 
     def load(self, index=None):