Mercurial > rinkhals
diff gamelib/engine.py @ 162:fa57868123d7
Basic cursor support
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 22:19:34 +0000 |
parents | 210fc1ea0516 |
children | e2b5262c2b11 |
line wrap: on
line diff
--- a/gamelib/engine.py Thu Sep 03 22:16:09 2009 +0000 +++ b/gamelib/engine.py Thu Sep 03 22:19:34 2009 +0000 @@ -87,6 +87,7 @@ if events_equal(e, START_NIGHT): return NightState(self.game) elif e.type is KEYDOWN and e.key == K_ESCAPE: + self.game.gameboard.reset_cursor() return GameOver(self.game) elif e.type is KEYDOWN and e.key == K_n: return pygame.event.post(START_NIGHT) @@ -130,6 +131,7 @@ elif e.type is KEYDOWN and e.key == K_d: return pygame.event.post(START_DAY) elif e.type is KEYDOWN and e.key == K_ESCAPE: + self.game.gameboard.reset_cursor() return GameOver(self.game) elif e.type is MOVE_FOX_ID: self.cycle_count += 1