From e198980be4f8b7939a922f7edbfd109440c44730 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:38:10 +0200 Subject: [PATCH] ImGui: fix logger not fading in/out with alpha m_fadeAlpha should also be applied on the color logger. --- r5dev/gameui/IConsole.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 9bf9fb05..1da1103f 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -242,7 +242,7 @@ bool CConsole::DrawSurface(void) // Eliminate padding around logger child. This padding gets added when // ImGuiChildFlags_Border flag gets set. - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2{ 1.f, 1.f }); numLoggerStyleVars++; + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2{ 1.f, 1.f }); numLoggerStyleVars++; // if we use the legacy theme, also account for one extra space as the // legacy theme has an extra separator at the bottom of the logger. @@ -255,6 +255,7 @@ bool CConsole::DrawSurface(void) ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_OverlayHorizontalScrollbar; + ImGui::PushStyleVar(ImGuiStyleVar_Alpha, m_fadeAlpha); numLoggerStyleVars++; ImGui::BeginChild(m_loggerLabel, ImVec2(0, -footerHeightReserve), loggerFlags, colorLoggerWindowFlags); // NOTE: scoped so the mutex releases after we have rendered.