X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=blobdiff_plain;f=naja%2Fwidgets%2Fboard.py;fp=naja%2Fwidgets%2Fboard.py;h=f7f8384198f8ae64023ae392bc5a091098152762;hp=e6eafa5e8a429468f39fcfe51b70927b68ef0160;hb=9ff6979c6cafe70ff36ceb9010048b7da4174bbc;hpb=3273de8b8e17a1d13e46ba920241eae1602d54bb diff --git a/naja/widgets/board.py b/naja/widgets/board.py index e6eafa5..f7f8384 100644 --- 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 -from naja.events import finish_event +from naja.events import InvalidateTheWorld, finish_event 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): + 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: