+
+ def handle_event(self, ev):
+ if self.state.gameboard.player_mode == MOVE:
+ return super(InfoAreaWidget, self).handle_event(ev)
+ if ev.type == pgl.KEYDOWN:
+ if ev.key in (pgl.K_RETURN, pgl.K_KP_ENTER):
+ self.state.gameboard.change_mode()
+ # FIXME: also need to signal the correct action
+ # here
+ InvalidateTheWorld.post()
+ return True
+ if ev.key in (pgl.K_UP, pgl.K_w):
+ if self.chosen > 0:
+ self.chosen -= 1
+ InvalidateTheWorld.post()
+ return True
+ if ev.key in (pgl.K_DOWN, pgl.K_s):
+ if self.chosen + 1 < len(self.card.actions):
+ self.chosen += 1
+ InvalidateTheWorld.post()
+ return True
+ return super(InfoAreaWidget, self).handle_event(ev)