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:
ocornut
2022-02-17 18:39:03 +01:00
parent 421e73e6db
commit 29d462ebce
4 changed files with 10 additions and 5 deletions

View File

@ -41,8 +41,11 @@ Other Changes:
- Clipper: Fixed a regression in 1.86 when not calling clipper.End() and late destructing the
clipper instance. High-level languages (Lua,Rust etc.) would typically be affected. (#4822)
- IsItemHovered(): added ImGuiHoveredFlags_NoNavOverride to disable the behavior where the
return value is overriden by focus when gamepad/keyboard navigation is active.
- Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate.
- Stack Tool: Added option to copy item path to clipboard. (#4631)
- Misc: Fixed IsAnyItemHovered() returning false when using navigation.
- Misc: Added constexpr to ImVec2/ImVec4 inline constructors. (#4995) [@Myriachan]
- Misc: binary_to_compressed_c tool: Added -nostatic option. (#5021) [@podsvirov]
- ImVector: Fixed erase() with empty range. (#5009) [@thedmd]