mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Nav: Addendum: only set io.WantSetMousePos if necessary. (#1867)
This commit is contained in:
parent
e3710448ae
commit
8e48ab6b19
@ -3262,8 +3262,11 @@ static void ImGui::NavUpdate()
|
||||
// Set mouse position given our knowledge of the navigated item position from last frame
|
||||
if ((g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) && (g.IO.BackendFlags & ImGuiBackendFlags_HasSetMousePos))
|
||||
{
|
||||
g.IO.MousePos = g.IO.MousePosPrev = NavCalcPreferredRefPos();
|
||||
g.IO.WantSetMousePos = true;
|
||||
if (!g.NavDisableHighlight && g.NavDisableMouseHover && g.NavWindow)
|
||||
{
|
||||
g.IO.MousePos = g.IO.MousePosPrev = NavCalcPreferredRefPos();
|
||||
g.IO.WantSetMousePos = true;
|
||||
}
|
||||
}
|
||||
g.NavMousePosDirty = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user