Skip to content

Commit

Permalink
Changed the keypad to show TEAM rather than 0 if the player number is…
Browse files Browse the repository at this point in the history
… set to zero
  • Loading branch information
Elsa Debrunner committed Dec 17, 2024
1 parent e24a71c commit 2991f78
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions refbox/src/app/view_builders/keypad_pages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use iced::{
Alignment, Length,
};

use style::SMALL_PLUS_TEXT;
use uwh_common::game_snapshot::GameSnapshot;

mod score_add;
Expand Down Expand Up @@ -126,10 +127,17 @@ pub(in super::super) fn build_keypad_page<'a>(
]
.spacing(SPACING),
row![
setup_keypad_button(
make_small_button("0", MEDIUM_TEXT),
Message::KeypadButtonPress(KeypadButton::Zero,)
),
if player_num == 0 {
setup_keypad_button(
make_small_button("TEAM", SMALL_PLUS_TEXT),
Message::ToggleBoolParameter(BoolGameParameter::TeamWarning),
)
} else {
setup_keypad_button(
make_small_button("0", MEDIUM_TEXT),
Message::KeypadButtonPress(KeypadButton::Zero),
)
},
setup_keypad_button(
button(
container(
Expand Down

0 comments on commit 2991f78

Please sign in to comment.