Nav: keyboard/gamepad activation feedback properly timed instead of frame buffer. (#456)

Amend d10641b
This commit is contained in:
ocornut
2024-01-22 17:40:48 +01:00
parent 5b5e9bd0cb
commit 4c2c09450a
3 changed files with 27 additions and 0 deletions

View File

@ -675,6 +675,10 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
g.ActiveIdHasBeenPressedBefore = true;
}
// Activation highlight
if (g.NavHighlightActivatedId == id)
hovered = true;
if (out_hovered) *out_hovered = hovered;
if (out_held) *out_held = held;