mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-14 17:13:46 +00:00
Active widgets is not clipped, so it can always release its active state (mentioned in #143)
Otherwise a change in layout moving active widget to a clipped region may lock the active id.
This commit is contained in:
parent
9918ec31d6
commit
16ddd796f3
1 changed files with 5 additions and 2 deletions
|
@ -7265,8 +7265,11 @@ static bool ItemAdd(const ImRect& bb, const ImGuiID* id)
|
|||
window->DC.LastItemRect = bb;
|
||||
if (IsClipped(bb))
|
||||
{
|
||||
window->DC.LastItemHoveredAndUsable = window->DC.LastItemHoveredRect = false;
|
||||
return false;
|
||||
if (!id || *id != GImGui->ActiveId)
|
||||
{
|
||||
window->DC.LastItemHoveredAndUsable = window->DC.LastItemHoveredRect = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// This is a sensible default, but widgets are free to override it after calling ItemAdd()
|
||||
|
|
Loading…
Add table
Reference in a new issue