mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-28 02:50:06 +00:00
Disabled items more consistently release active id if the active item got disabled. (#211)
This commit is contained in:
parent
ba1c8464ef
commit
29525255f3
2 changed files with 5 additions and 0 deletions
|
|
@ -611,6 +611,10 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
|||
}
|
||||
}
|
||||
|
||||
// Release active id if turning disabled
|
||||
if (g.ActiveId == id && (g.CurrentItemFlags & ImGuiItemFlags_Disabled))
|
||||
ClearActiveID();
|
||||
|
||||
// Process while held
|
||||
bool held = false;
|
||||
if (g.ActiveId == id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue