From 2a46865fc69e2e90e28bc13255a762279e7a1b29 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 14 May 2014 22:55:52 +0200 Subject: [PATCH] Highlight illegal actions in a different colour --- naja/widgets/info_area.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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, -- 2.34.1