From 7c576dd4d03509e8857011b98a260fe22a922c28 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Wed, 10 Jan 2024 14:17:29 +0100 Subject: [PATCH] make fade less noticable --- src/chat_gui4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index 2f43bec4..730dd643 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -258,7 +258,7 @@ void ChatGui4::render(float time_delta) { msg_reg.view().each([&to_remove, time_delta](const Message3 e, Components::UnreadFade& fade) { // TODO: configurable const float fade_duration = 7.5f; - fade.fade -= 1.f/fade_duration * time_delta; + fade.fade -= 1.f/fade_duration * std::min(time_delta, 1.f/10.f); // fps but not below 10 for smooth fade if (fade.fade <= 0.f) { to_remove.push_back(e); }