mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Nav: Mouse clicking on a window (to select/move) disables hides nav highlight. (#787) + comments
This commit is contained in:
parent
89b0ca1f8f
commit
d404b93b6b
@ -3791,6 +3791,7 @@ void ImGui::EndFrame()
|
||||
// Set ActiveId even if the _NoMove flag is set, without it dragging away from a window with _NoMove would activate hover on other windows.
|
||||
FocusWindow(g.HoveredWindow);
|
||||
SetActiveID(g.HoveredWindow->MoveId, g.HoveredWindow);
|
||||
g.NavDisableHighlight = true;
|
||||
g.ActiveIdClickOffset = g.IO.MousePos - g.HoveredRootWindow->Pos;
|
||||
if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove) && !(g.HoveredRootWindow->Flags & ImGuiWindowFlags_NoMove))
|
||||
g.MovingWindow = g.HoveredWindow;
|
||||
|
@ -905,7 +905,7 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 SetWindowPosPivot; // store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
|
||||
|
||||
ImGuiID NavLastIds[2]; // Last known NavId for this window, per layer (0/1)
|
||||
ImRect NavRectRel[2]; // Reference rectangle, in window space
|
||||
ImRect NavRectRel[2]; // Reference rectangle, in window relative space
|
||||
|
||||
ImGuiDrawContext DC; // Temporary per-window data, reset at the beginning of the frame
|
||||
ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack
|
||||
|
Loading…
Reference in New Issue
Block a user