projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turquoise.
[naja.git]
/
naja
/
widgets
/
info_area.py
diff --git
a/naja/widgets/info_area.py
b/naja/widgets/info_area.py
index d8e77b9b8103bbbfc6df76f0672b8b8b579ac006..36b375533f0c497f68f80151b7e9357b8f64b792 100644
(file)
--- a/
naja/widgets/info_area.py
+++ b/
naja/widgets/info_area.py
@@
-20,12
+20,12
@@
from naja.widgets.text import TextBoxWidget, TextWidget
HINTS = {
HINTS = {
- ACT:
("Choose an action using the Up/Down
keys.\n"
-
"Press Return to execute the action.")
,
- EXAMINE: "
Select a tile to examine using the arrow
keys.",
+ ACT:
"Choose an action using {NORTH,SOUTH}
keys.\n"
+
"Press {RETURN} to execute it."
,
+ EXAMINE: "
Browse the tiles with {NORTH,SOUTH,EAST,WEST}
keys.",
}
}
-HINT_LEGAL_MOVE = "\nPress
Return
to move to this tile."
+HINT_LEGAL_MOVE = "\nPress
{RETURN}
to move to this tile."
TITLES = {
ACT: "Choose an Action",
TITLES = {
ACT: "Choose an Action",
@@
-85,8
+85,9
@@
class InfoAreaWidget(Widget):
hint = TextBoxWidget(
(0, 0), hint_text, padding=4,
hint = TextBoxWidget(
(0, 0), hint_text, padding=4,
- box_width=box_width,
- border=2, border_colour=PALETTE.GREY)
+ colour=PALETTE.WHITE, border=2,
+ bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLUE,
+ box_width=box_width)
hint.prepare()
y_offset = (INFO_SIZE[1] - hint.surface.get_rect().height
- BIT_SIZE[1] - 2)
hint.prepare()
y_offset = (INFO_SIZE[1] - hint.surface.get_rect().height
- BIT_SIZE[1] - 2)
@@
-150,6
+151,14
@@
class InfoAreaWidget(Widget):
else:
glyphs_x_offset = INFO_LEFT_PADDING
else:
glyphs_x_offset = INFO_LEFT_PADDING
+ if BITS.MSB in action.required_bits:
+ msb = resources.get_image('board/msb_lock_decoration.png',
+ transforms=(EIGHT_BIT,))
+ msb_rect = msb.get_rect()
+ self.surface.blit(
+ msb, (glyphs_x_offset - msb_rect.width - 4, glyphs_y_offset)
+ )
+
for glyph in action.get_glyphs():
img = resources.get_image(
glyph, transforms=(EIGHT_BIT, blender(PALETTE.GREY)))
for glyph in action.get_glyphs():
img = resources.get_image(
glyph, transforms=(EIGHT_BIT, blender(PALETTE.GREY)))