From: Neil Date: Wed, 14 May 2014 20:55:52 +0000 (+0200) Subject: Highlight illegal actions in a different colour X-Git-Tag: 0.1~298 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=2a46865fc69e2e90e28bc13255a762279e7a1b29;hp=7e9bc2714876bc3288d356578820a22fee60dd1a;p=naja.git Highlight illegal actions in a different colour --- diff --git a/naja/widgets/info_area.py b/naja/widgets/info_area.py index a240674..8399882 100644 --- a/naja/widgets/info_area.py +++ b/naja/widgets/info_area.py @@ -83,7 +83,10 @@ class InfoAreaWidget(Widget): # self.chosen may be None, in which case we don't draw the border. if choice == self.chosen: - colour = (255, 255, 0, 128) + if not action.check_available(self.state.player): + colour = (255, 0, 0, 255) + else: + colour = (255, 255, 0, 128) bottom = y_offset + text.surface.get_rect().height right = text.surface.get_rect().width + 12 pygame.draw.lines(self.surface, colour, True,