From c7ec2a9e0e2819bfd9dce064c50f1b97c5c28c09 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 28 Sep 2022 00:26:29 +0200 Subject: [PATCH] Check for popup background fade animation. --- profiler/src/main.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index e67ab0fe..b39da8ae 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -277,15 +277,23 @@ static void DrawContents() } else { - auto& inputQueue = ImGui::GetCurrentContext()->InputEventsQueue; - if( !inputQueue.empty() ) + auto ctx = ImGui::GetCurrentContext(); + if( ctx->DimBgRatio != 0 && ctx->DimBgRatio != 1 ) { - for( auto& v : inputQueue ) + activeFrames = 3; + } + else + { + auto& inputQueue = ctx->InputEventsQueue; + if( !inputQueue.empty() ) { - if( v.Type != ImGuiInputEventType_MouseViewport ) + for( auto& v : inputQueue ) { - activeFrames = 3; - break; + if( v.Type != ImGuiInputEventType_MouseViewport ) + { + activeFrames = 3; + break; + } } } }