Make leave messages red

This commit is contained in:
griffi-gh 2024-04-25 17:50:09 +02:00
parent e373aa758c
commit dc1a641887
2 changed files with 7 additions and 1 deletions

View file

@ -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<ChatMessage>,

View file

@ -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)