From 50d8d1faee6365f3a39b9d6b0b9a94fbe0a41ac8 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 21 Mar 2024 06:04:06 +0100 Subject: [PATCH] refined chatbox --- src/hud.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/hud.rs b/src/hud.rs index 19b45d2..a87fd00 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -273,7 +273,7 @@ fn setup( TextStyle { font: asset_server.load(FONT), font_size: settings.font_size_hud, - color: Color::GRAY, + color: Color::rgb(0.7, 0.7, 0.7), ..default() } ), @@ -287,7 +287,7 @@ fn setup( } ), TextSection::new( - "", + "\n\n\n", TextStyle { font: asset_server.load(FONT), font_size: settings.font_size_hud, @@ -384,7 +384,12 @@ fn update( choices.push(format!("{press_this} {reply}")); count += 1; } - chat.sections[2].value = choices.join("\n"); + if count < 4 { + for _padding in 0..(4-count) { + choices.push(" ".to_string()); + } + chat.sections[2].value = choices.join("\n"); + } // Chat Log and System Log let logfilter = if settings.hud_active { @@ -393,7 +398,8 @@ fn update( |msg: &&Message| { match msg.level { LogLevel::Chat => true, LogLevel::Warning => true, - _ => false + LogLevel::Info => true, + //_ => false }} }; let logs_vec: Vec = log.logs.iter()