Add tabbing around info area.
authorSimon Cross <hodgestar@gmail.com>
Thu, 15 May 2014 18:51:34 +0000 (20:51 +0200)
committerSimon Cross <hodgestar@gmail.com>
Thu, 15 May 2014 18:51:34 +0000 (20:51 +0200)
naja/widgets/info_area.py

index f9f2573364ff1e93edf21a0fa8a9b681066eb346..85f4bda09e0fbc1fd032f75edfca4444e7a95e38 100644 (file)
@@ -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)