2
0
Эх сурвалжийг харах

Nav: Mouse hovering selectable / menu items only activate them if they are on the active NavLayer. (#787)

omar 7 жил өмнө
parent
commit
c8b9b2c6bd
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -10600,7 +10600,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
 
 
     // Hovering selectable with mouse updates NavId accordingly so navigation can be resumed with gamepad/keyboard (this doesn't happen on most widgets)
     // Hovering selectable with mouse updates NavId accordingly so navigation can be resumed with gamepad/keyboard (this doesn't happen on most widgets)
     if (pressed || hovered)// && (g.IO.MouseDelta.x != 0.0f || g.IO.MouseDelta.y != 0.0f))
     if (pressed || hovered)// && (g.IO.MouseDelta.x != 0.0f || g.IO.MouseDelta.y != 0.0f))
-        if (!g.NavDisableMouseHover && g.NavWindow == window)
+        if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerActiveMask)
         {
         {
             g.NavDisableHighlight = true;
             g.NavDisableHighlight = true;
             SetNavID(id, window->DC.NavLayerCurrent);
             SetNavID(id, window->DC.NavLayerCurrent);