mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Set HoveredID even when g.NavDisableMouseHover is set by gamepad/keyboard navigation. This will facilitate the use of future InputOwner API based on HoveredID/ActiveID.
Note that this widen the small gap between polling g.HoveredID and using IsItemHovered() the later does various filtering. Added IsItemHovered(ImGuiHoveredFlags_NoNavOverride) to disable that specific state redirect/filter. Side-effect: fix EndGroup() use of combining HoveredId values when gamepad/keyboard nav is active. Unlikely to have user-visible side effect since IsItemHovered() would have filtered out anyway. Side-effect: fix IsAnyItemHovered() when gamepad/keyboard is active (but this wasn't the primary intent of this change). Side-effect: fix using SetItemUsingMouseWheel() while hovering an item and gamepad/keyboard is active. (#2891)
This commit is contained in:
@ -6925,7 +6925,7 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled)
|
||||
if (!enabled)
|
||||
EndDisabled();
|
||||
|
||||
const bool hovered = (g.HoveredId == id) && enabled;
|
||||
const bool hovered = (g.HoveredId == id) && enabled && !g.NavDisableMouseHover;
|
||||
if (menuset_is_open)
|
||||
g.NavWindow = backed_nav_window;
|
||||
|
||||
|
Reference in New Issue
Block a user