From 2991f783ea4dc25666279ac7840adb04b8885491 Mon Sep 17 00:00:00 2001 From: Elsa Debrunner Date: Tue, 17 Dec 2024 13:25:07 -0600 Subject: [PATCH] Changed the keypad to show TEAM rather than 0 if the player number is set to zero --- refbox/src/app/view_builders/keypad_pages/mod.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/refbox/src/app/view_builders/keypad_pages/mod.rs b/refbox/src/app/view_builders/keypad_pages/mod.rs index fd80eb4..f17c3fd 100644 --- a/refbox/src/app/view_builders/keypad_pages/mod.rs +++ b/refbox/src/app/view_builders/keypad_pages/mod.rs @@ -17,6 +17,7 @@ use iced::{ Alignment, Length, }; +use style::SMALL_PLUS_TEXT; use uwh_common::game_snapshot::GameSnapshot; mod score_add; @@ -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(