projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure that the flash starts ON after ever mode change
[naja.git]
/
naja
/
widgets
/
board.py
diff --git
a/naja/widgets/board.py
b/naja/widgets/board.py
index e6eafa5e8a429468f39fcfe51b70927b68ef0160..f7f8384198f8ae64023ae392bc5a091098152762 100644
(file)
--- a/
naja/widgets/board.py
+++ b/
naja/widgets/board.py
@@
-4,7
+4,7
@@
Widget that holds the game tiles.
import pygame.locals as pgl
from naja.constants import BOARD_SIZE, TILE_SIZE, KEYS, ACT, FPS
import pygame.locals as pgl
from naja.constants import BOARD_SIZE, TILE_SIZE, KEYS, ACT, FPS
-from naja.events import finish_event
+from naja.events import
InvalidateTheWorld,
finish_event
from naja.sound import sound
from naja.widgets.base import Widget
from naja.sound import sound
from naja.widgets.base import Widget
@@
-71,6
+71,8
@@
class BoardWidget(Widget):
tile.animation = 0
def handle_event(self, ev):
tile.animation = 0
def handle_event(self, ev):
+ if InvalidateTheWorld.matches(ev):
+ self.flash_light.reset()
if self.state.gameboard.player_mode == ACT:
return super(BoardWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN:
if self.state.gameboard.player_mode == ACT:
return super(BoardWidget, self).handle_event(ev)
if ev.type == pgl.KEYDOWN: