mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 04:17:00 +00:00
IsWindowHovered() Fix behavior when an item is active to use the same logic as IsItemHovered() (#1382, #1404)
This commit is contained in:
parent
1e7cc23867
commit
803ac3a5c6
@ -5115,7 +5115,7 @@ bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
|
|||||||
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
|
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
|
||||||
return false;
|
return false;
|
||||||
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
|
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
|
||||||
if (g.ActiveId != 0 && g.ActiveIdWindow != g.CurrentWindow)
|
if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -5151,7 +5151,7 @@ bool ImGui::IsRootWindowOrAnyChildHovered(ImGuiHoveredFlags flags)
|
|||||||
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
|
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
|
||||||
return false;
|
return false;
|
||||||
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
|
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
|
||||||
if (g.ActiveId != 0 && g.ActiveIdWindow != g.CurrentWindow)
|
if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user