From 6184b671c57432848a48de7fe8b068b8f53e151a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 31 Jan 2024 00:53:20 +1000 Subject: [PATCH] ImGuiFullscreen: Slightly improve hover/animation behavior --- src/util/imgui_fullscreen.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 583c25fb8..13e8ff306 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -841,9 +841,10 @@ void ImGuiFullscreen::DrawMenuButtonFrame(const ImVec2& p_min, const ImVec2& p_m ImVec2 frame_min = p_min; ImVec2 frame_max = p_max; - if (ImGui::GetIO().NavVisible && ImGui::GetHoveredID() != ImGui::GetItemID()) + const ImGuiIO& io = ImGui::GetIO(); + if (io.NavVisible) { - if (!s_had_hovered_menu_item) + if (!s_had_hovered_menu_item || io.MouseDelta.x != 0.0f || io.MouseDelta.y != 0.0f) { s_menu_button_frame_min_animated.Reset(frame_min); s_menu_button_frame_max_animated.Reset(frame_max);