projects
/
naja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7e9bc27
)
Highlight illegal actions in a different colour
author
Neil
<neil@dip.sun.ac.za>
Wed, 14 May 2014 20:55:52 +0000
(22:55 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Wed, 14 May 2014 20:55:52 +0000
(22:55 +0200)
naja/widgets/info_area.py
patch
|
blob
|
history
diff --git
a/naja/widgets/info_area.py
b/naja/widgets/info_area.py
index a2406746dea23cc1f85b0958ce4cc015e0f320d0..83998822bb054794766de2d0bdd24ba96aa2b568 100644
(file)
--- 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:
# 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,
bottom = y_offset + text.surface.get_rect().height
right = text.surface.get_rect().width + 12
pygame.draw.lines(self.surface, colour, True,