Menus: Fixed using IsItemHovered()/IsItemClicked() on BeginMenu(). (#5775)

This commit is contained in:
ocornut
2022-10-14 17:39:04 +02:00
parent 3920b1c764
commit 81176737f8
4 changed files with 12 additions and 3 deletions

View File

@ -3640,7 +3640,7 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
// Test if interactions on this window are blocked by an active popup or modal.
// The ImGuiHoveredFlags_AllowWhenBlockedByPopup flag will be tested here.
if (!IsWindowContentHoverable(window, flags))
if (!IsWindowContentHoverable(window, flags) && !(g.LastItemData.InFlags & ImGuiItemFlags_NoWindowHoverableCheck))
return false;
// Test if the item is disabled