mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-22 06:48:43 -06:00
Make leave messages red
This commit is contained in:
parent
e373aa758c
commit
dc1a641887
|
@ -18,6 +18,12 @@ pub enum ChatMessage {
|
||||||
System(String),
|
System(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// impl ChatMessage {
|
||||||
|
// pub fn render() -> String {
|
||||||
|
// todo!() //TODO
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
#[derive(Unique, Default)]
|
#[derive(Unique, Default)]
|
||||||
pub struct ChatHistory {
|
pub struct ChatHistory {
|
||||||
pub messages: Vec<ChatMessage>,
|
pub messages: Vec<ChatMessage>,
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub fn render_chat(
|
||||||
(format!("{username} ({id}) joined the game"), color::YELLOW)
|
(format!("{username} ({id}) joined the game"), color::YELLOW)
|
||||||
}
|
}
|
||||||
ChatMessage::PlayerLeave { username, id } => {
|
ChatMessage::PlayerLeave { username, id } => {
|
||||||
(format!("{username} ({id}) left the game"), color::YELLOW)
|
(format!("{username} ({id}) left the game"), color::RED)
|
||||||
}
|
}
|
||||||
ChatMessage::System(message) => {
|
ChatMessage::System(message) => {
|
||||||
(message.clone(), color::WHITE)
|
(message.clone(), color::WHITE)
|
||||||
|
|
Loading…
Reference in a new issue