projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust save slot positioning.
[naja.git]
/
naja
/
widgets
/
info_area.py
diff --git
a/naja/widgets/info_area.py
b/naja/widgets/info_area.py
index a25d5bfdf5b5add97ae79da46c7729adf9a01e51..e5ee88c9e875160a4eed586c0e3610d0e5ce0aa3 100644
(file)
--- a/
naja/widgets/info_area.py
+++ b/
naja/widgets/info_area.py
@@
-94,7
+94,7
@@
class InfoAreaWidget(Widget):
# Game mode (puzzle, easy, standard, hard, etc ...)
game_mode = TextBoxWidget(
# Game mode (puzzle, easy, standard, hard, etc ...)
game_mode = TextBoxWidget(
- (0, 0),
"UNKNOWN"
, padding=4, centre=True,
+ (0, 0),
self.mode_hint()
, padding=4, centre=True,
colour=PALETTE.WHITE, border=2,
bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLUE,
box_width=box_width)
colour=PALETTE.WHITE, border=2,
bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLUE,
box_width=box_width)
@@
-103,6
+103,16
@@
class InfoAreaWidget(Widget):
y_offset = (INFO_SIZE[1] - BIT_SIZE[1] + 12)
self.surface.blit(game_mode.surface, pos())
y_offset = (INFO_SIZE[1] - BIT_SIZE[1] + 12)
self.surface.blit(game_mode.surface, pos())
+ def mode_hint(self):
+ gameboard = self.state.gameboard
+ if gameboard.puzzle:
+ return "PUZZLE"
+ return {
+ 0: "DEATH", 1: "LUDICROUS",
+ 2: "RAMBO", 3: "HARD",
+ 4: "STANDARD", 5: "EASY",
+ }.get(gameboard.max_health, "UNKNOWN")
+
def prepare_action(self, choice, action, y_offset, box_width):
x_offset = INFO_LEFT_PADDING
glyphs_x_offset = 0
def prepare_action(self, choice, action, y_offset, box_width):
x_offset = INFO_LEFT_PADDING
glyphs_x_offset = 0