From 693111893183e09fa9cc6113e0f6de10cd119028 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 25 Apr 2024 17:50:09 +0200 Subject: [PATCH] Make leave messages red --- kubi/src/chat.rs | 6 ++++++ kubi/src/ui/chat_ui.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kubi/src/chat.rs b/kubi/src/chat.rs index 862aa46..5d2fe33 100644 --- a/kubi/src/chat.rs +++ b/kubi/src/chat.rs @@ -18,6 +18,12 @@ pub enum ChatMessage { System(String), } +// impl ChatMessage { +// pub fn render() -> String { +// todo!() //TODO +// } +// } + #[derive(Unique, Default)] pub struct ChatHistory { pub messages: Vec, diff --git a/kubi/src/ui/chat_ui.rs b/kubi/src/ui/chat_ui.rs index d419ed6..e13ffb6 100644 --- a/kubi/src/ui/chat_ui.rs +++ b/kubi/src/ui/chat_ui.rs @@ -22,7 +22,7 @@ pub fn render_chat( (format!("{username} ({id}) joined the game"), color::YELLOW) } ChatMessage::PlayerLeave { username, id } => { - (format!("{username} ({id}) left the game"), color::YELLOW) + (format!("{username} ({id}) left the game"), color::RED) } ChatMessage::System(message) => { (message.clone(), color::WHITE)