mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-08 14:53:45 +00:00
Fix IsItemHovered() returning true for non-title bar hidden items that are clipped due to window collapsing logic. Fix 27fd1b913b
. (#823)
This commit is contained in:
parent
6f7b1bf2e1
commit
067605052d
1 changed files with 3 additions and 0 deletions
|
@ -2009,6 +2009,9 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
|
||||||
return false;
|
return false;
|
||||||
if (window->DC.ItemFlags & ImGuiItemFlags_Disabled)
|
if (window->DC.ItemFlags & ImGuiItemFlags_Disabled)
|
||||||
return false;
|
return false;
|
||||||
|
// Special handling for the 1st item after Begin() which represent the title bar. When the window is collapsed (SkipItems==true) that last item will never be overwritten.
|
||||||
|
if (window->DC.LastItemId == window->MoveId && window->WriteAccessed)
|
||||||
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue