ButtonBehavior, Selectable: made low-level ImGuiButtonFlags_PressedOnRelease not explicitely avoid taking current active id. ImGuiButtonFlags_NoHoldingActiveId may be used for that.

Ditto for ImGuiSelectableFlags_SelectOnRelease, ImGuiSelectableFlags_NoHoldingActiveId. All internals.
Toward #9312
This commit is contained in:
ocornut
2026-03-20 20:05:24 +01:00
parent 4af77622d9
commit 50b488765f
4 changed files with 16 additions and 3 deletions

View File

@@ -1033,7 +1033,7 @@ enum ImGuiButtonFlagsPrivate_
ImGuiButtonFlags_PressedOnClick = 1 << 4, // return true on click (mouse down event)
ImGuiButtonFlags_PressedOnClickRelease = 1 << 5, // [Default] return true on click + release on same item <-- this is what the majority of Button are using
ImGuiButtonFlags_PressedOnClickReleaseAnywhere = 1 << 6, // return true on click + release even if the release event is not done while hovering the item
ImGuiButtonFlags_PressedOnRelease = 1 << 7, // return true on release (default requires click+release)
ImGuiButtonFlags_PressedOnRelease = 1 << 7, // return true on release (default requires click+release). Prior to 2026/03/20 this implied ImGuiButtonFlags_NoHoldingActiveId but they are separate now.
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 8, // return true on double-click (default requires click+release)
ImGuiButtonFlags_PressedOnDragDropHold = 1 << 9, // return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
//ImGuiButtonFlags_Repeat = 1 << 10, // hold to repeat -> use ImGuiItemFlags_ButtonRepeat instead.