Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
237:cbe9dbd80dfb | 238:0e1762b1ab9f |
---|---|
114 elif symbol == pyglet.window.key.RIGHT: | 114 elif symbol == pyglet.window.key.RIGHT: |
115 self.change(+1) | 115 self.change(+1) |
116 elif symbol == pyglet.window.key.TAB: | 116 elif symbol == pyglet.window.key.TAB: |
117 self.toggle_sprites() | 117 self.toggle_sprites() |
118 elif symbol >= pyglet.window.key.F1 and symbol <= pyglet.window.key.F12: | 118 elif symbol >= pyglet.window.key.F1 and symbol <= pyglet.window.key.F12: |
119 print (symbol - pyglet.window.key.F1 + (12 if modifiers == pyglet.window.key.MOD_CTRL else 0) + 1) | 119 interrupt = symbol - pyglet.window.key.F1 + 1 |
120 #self._anmrunner.interrupt(symbol - pyglet.window.key.F1 + (12 if modifiers == pyglet.window.key.MOD_CTRL) + 1) | 120 if modifiers == pyglet.window.key.MOD_CTRL: |
121 interrupt += 12 | |
122 self._anmrunner.interrupt(interrupt) | |
121 | 123 |
122 | 124 |
123 def load(self, index=None): | 125 def load(self, index=None): |
124 if index is None: | 126 if index is None: |
125 index = self.num | 127 index = self.num |