mirror of
https://github.com/Drezil/imgui.git
synced 2025-12-16 08:21:04 +01:00
Nav: marking NavId as hovered in ButtonBehavior() doesn't check for ActiveId.
Aimed at allowing activating another item with a shortcut without losing NavId. Initial logic fromc2cb2a69, with minor amendsdb5f1b79c,cea78cc57.
This commit is contained in:
@@ -599,7 +599,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
|
||||
// Gamepad/Keyboard navigation
|
||||
// We report navigated item as hovered but we don't set g.HoveredId to not interfere with mouse.
|
||||
if (g.NavId == id && !g.NavDisableHighlight && g.NavDisableMouseHover && (g.ActiveId == 0 || g.ActiveId == id || g.ActiveId == window->MoveId))
|
||||
if (g.NavId == id && !g.NavDisableHighlight && g.NavDisableMouseHover)
|
||||
if (!(flags & ImGuiButtonFlags_NoHoveredOnFocus))
|
||||
hovered = true;
|
||||
if (g.NavActivateDownId == id)
|
||||
|
||||
Reference in New Issue
Block a user