Skip to content

Commit

Permalink
[tui] 0HP = "DEAD" + button margin in modal
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacy committed Dec 8, 2023
1 parent 23527a6 commit 08c01c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion osrgame/osrgame/screen.tcss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ RadioSet {

.button {
margin: 1;
background: $surface-lighten-1;
}

.char_create_buttons {
Expand Down
4 changes: 2 additions & 2 deletions osrgame/osrgame/screen_modal_new_char.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def compose(self) -> ComposeResult:
Input(id="character_name", placeholder="Enter character name"),
CharacterClassRadioButtons(),
Horizontal(
Button("Create", id="btn_char_create", variant="primary"),
Button("Cancel", id="btn_char_cancel", variant="default"),
Button("Create", id="btn_char_create", variant="primary", classes="button"),
Button("Cancel", id="btn_char_cancel", variant="default", classes="button"),
classes="char_create_buttons",
),
id="new_character_grid",
Expand Down
2 changes: 1 addition & 1 deletion osrgame/osrgame/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def update_table(self):
pc.name,
pc.character_class.class_type.value,
Text(str(pc.level), justify="center"),
Text(f"{str(pc.hit_points)}/{str(pc.max_hit_points)}", justify="center"),
Text("DEAD" if pc.hit_points <= 0 else f"{pc.hit_points}/{pc.max_hit_points}", justify="center"),
Text(str(pc.armor_class), justify="center"),
Text(str(pc.xp) + "/" + str(pc.xp_needed_for_next_level), justify="center"),
]
Expand Down

0 comments on commit 08c01c7

Please sign in to comment.