From 22bfc62acc1e9bf42633c3da5543c8de41539d14 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 15 Apr 2024 23:23:16 +0200 Subject: [PATCH] Revert "fade out text through color, not alpha, for performance reasons" I don't actually think there's any performance reasons.... This reverts commit 35d69377933995124a0e9417ff244e7ddc9bb3b2. --- src/hud.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hud.rs b/src/hud.rs index 91a7b67..c2303d9 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -522,13 +522,14 @@ fn update_hud( for msg in &messages { chat.sections[row].value = msg.format(); let freshness = msg.get_freshness(); - let brightness: f32 = (freshness.powf(1.5) as f32).clamp(0.1, 1.0); + let clr: f32 = (freshness.powf(1.5) as f32).clamp(0.1, 1.0); freshest_line = freshest_line.max(freshness); chat.sections[row].style.color = match msg.level { LogLevel::Warning => settings.hud_color_console_warn, LogLevel::Info => settings.hud_color_console_system, _ => settings.hud_color_console, - } * brightness; + }; + chat.sections[row].style.color.set_a(clr); row += 1; }