mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Internals: move chunks of IsItemHovered() so upcoming commit can be less noisy. This commit should be a no-op (check by comparing without white-space changes)
This commit is contained in:
parent
2c29e391dd
commit
d80a9123b7
@ -3278,9 +3278,11 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
||||
{
|
||||
if ((g.LastItemData.InFlags & ImGuiItemFlags_Disabled) && !(flags & ImGuiHoveredFlags_AllowWhenDisabled))
|
||||
return false;
|
||||
return IsItemFocused();
|
||||
if (!IsItemFocused())
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// Test for bounding box overlap, as updated as ItemAdd()
|
||||
ImGuiItemStatusFlags status_flags = g.LastItemData.StatusFlags;
|
||||
if (!(status_flags & ImGuiItemStatusFlags_HoveredRect))
|
||||
@ -3314,6 +3316,8 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
||||
// When the window is collapsed (SkipItems==true) that last item will never be overwritten so we need to detect the case.
|
||||
if (g.LastItemData.ID == window->MoveId && window->WriteAccessed)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user