mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-26 12:27:30 +00:00
Nav: keyboard/gamepad activation mark widgets as held to give better visual feedback.
This commit is contained in:
@@ -666,7 +666,9 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
else if (g.ActiveIdSource == ImGuiInputSource_Keyboard || g.ActiveIdSource == ImGuiInputSource_Gamepad)
|
||||
{
|
||||
// When activated using Nav, we hold on the ActiveID until activation button is released
|
||||
if (g.NavActivateDownId != id)
|
||||
if (g.NavActivateDownId == id)
|
||||
held = true;
|
||||
else
|
||||
ClearActiveID();
|
||||
}
|
||||
if (pressed)
|
||||
|
||||
Reference in New Issue
Block a user