From 6a3fa7c64c02a96bb3eecf3c013687b83524f52a Mon Sep 17 00:00:00 2001 From: yuni Date: Sat, 26 Oct 2024 23:20:51 +0200 Subject: [PATCH] tweak phonebook rendering --- src/chat.rs | 2 +- src/menu.rs | 4 ++-- src/var.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 758695e..5ecf0b6 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -28,7 +28,7 @@ pub const CHATS: &[&str] = &[ pub const CONTACTS: &[&str] = &["icarus", "travel", "luna", "nox"]; pub const CONTACTS_PRETTY: &[&str] = &["Icarus", "FASTravel", "Luna", "Nox"]; -pub const CONTACTS_UNKNOWN: &str = "[unknown]"; +pub const CONTACTS_UNKNOWN: &str = "[Unknown]"; pub const TEXT_CONTINUE: &str = "Continue..."; diff --git a/src/menu.rs b/src/menu.rs index 1e90687..7108deb 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -508,9 +508,9 @@ pub fn update_menu( let text_index = i + achievement_bools.len() + 2; let registered = prefs.contacts.contains(&contact.to_string()); text.sections[text_index].style.color = if registered { - settings.hud_color_achievement_accomplished + settings.hud_color_phonebook_unlocked } else { - settings.hud_color_achievement + settings.hud_color_phonebook_locked }; text.sections[text_index].value = if registered { chat::CONTACTS_PRETTY[i].to_string() + "\n" diff --git a/src/var.rs b/src/var.rs index e8d08c5..5bf7450 100644 --- a/src/var.rs +++ b/src/var.rs @@ -80,6 +80,8 @@ pub struct Settings { pub hud_color_achievement: Color, pub hud_color_achievement_header: Color, pub hud_color_achievement_accomplished: Color, + pub hud_color_phonebook_locked: Color, + pub hud_color_phonebook_unlocked: Color, pub hud_color_death: Color, pub hud_color_death_achievements: Color, pub hud_color_keybindings: Color, @@ -222,6 +224,8 @@ impl Default for Settings { hud_color_achievement: Srgba::hex(COLOR_DIM).unwrap().into(), hud_color_achievement_accomplished: Srgba::hex(COLOR_SUCCESS).unwrap().into(), hud_color_achievement_header: Srgba::hex(COLOR_PRIMARY).unwrap().into(), + hud_color_phonebook_locked: Srgba::hex(COLOR_DIM).unwrap().into(), + hud_color_phonebook_unlocked: Srgba::hex(COLOR_SECONDARY).unwrap().into(), hud_color_death: Srgba::hex(COLOR_SECONDARY).unwrap().into(), hud_color_death_achievements: Srgba::hex(COLOR_SECONDARY).unwrap().into(), hud_color_keybindings: Srgba::hex(COLOR_DIM).unwrap().into(),