From: Simon Cross Date: Thu, 15 May 2014 18:51:34 +0000 (+0200) Subject: Add tabbing around info area. X-Git-Tag: 0.1~273 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=3443cae10f8d3e3ff6684034eba9e6a372dd2d52;p=naja.git Add tabbing around info area. --- diff --git a/naja/widgets/info_area.py b/naja/widgets/info_area.py index f9f2573..85f4bda 100644 --- a/naja/widgets/info_area.py +++ b/naja/widgets/info_area.py @@ -119,7 +119,6 @@ class InfoAreaWidget(Widget): action = self.card.actions[self.chosen] if not action.check_available(player): sound.play_sound('error.ogg') - print "BEEP!" else: action.perform_action(self.state.gameboard, self.card) self.state.gameboard.replace_card(player.position) @@ -136,4 +135,11 @@ class InfoAreaWidget(Widget): sound.play_sound('change_action.ogg') self.chosen += 1 return finish_event() + if ev.key in KEYS.SWITCH: + sound.play_sound('change_action.ogg') + if self.chosen + 1 < len(self.card.actions): + self.chosen += 1 + else: + self.chosen = 0 + return finish_event() return super(InfoAreaWidget, self).handle_event(ev)