mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 05:01:05 +01:00 
			
		
		
		
	Nav: Mouse clicking on a window (to select/move) disables hides nav highlight. (#787) + comments
This commit is contained in:
		| @@ -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. |                     // 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); |                     FocusWindow(g.HoveredWindow); | ||||||
|                     SetActiveID(g.HoveredWindow->MoveId, g.HoveredWindow); |                     SetActiveID(g.HoveredWindow->MoveId, g.HoveredWindow); | ||||||
|  |                     g.NavDisableHighlight = true; | ||||||
|                     g.ActiveIdClickOffset = g.IO.MousePos - g.HoveredRootWindow->Pos; |                     g.ActiveIdClickOffset = g.IO.MousePos - g.HoveredRootWindow->Pos; | ||||||
|                     if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove) && !(g.HoveredRootWindow->Flags & ImGuiWindowFlags_NoMove)) |                     if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove) && !(g.HoveredRootWindow->Flags & ImGuiWindowFlags_NoMove)) | ||||||
|                         g.MovingWindow = g.HoveredWindow; |                         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. |     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) |     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 |     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 |     ImVector<ImGuiID>       IDStack;                            // ID stack. ID are hashes seeded with the value at the top of the stack | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user