Perform selected action.
authorJeremy Thurgood <firxen@gmail.com>
Tue, 13 May 2014 17:55:51 +0000 (19:55 +0200)
committerJeremy Thurgood <firxen@gmail.com>
Tue, 13 May 2014 17:56:58 +0000 (19:56 +0200)
naja/widgets/info_area.py

index 2a4d06b69e2ca5082ccd2508f4f27bcb7461212d..317dfc631cf34ce52ce8d4aa0b7bf3f12be43d5e 100644 (file)
@@ -84,8 +84,8 @@ class InfoAreaWidget(Widget):
         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
+                self.card.actions[self.chosen].perform_action(
+                    self.state.gameboard, self.card)
                 InvalidateTheWorld.post()
                 return True
             if ev.key in (pgl.K_UP, pgl.K_w):