mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Overlap: Fixed first frame of an overlap highlighting underlying item if previous frame didn't hover anything. (#6512, #3909, #517)
This commit is contained in:
@ -524,7 +524,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
g.HoveredWindow = backup_hovered_window;
|
||||
|
||||
// AllowOverlap mode (rarely used) requires previous frame HoveredId to be null or to match. This allows using patterns where a later submitted widget overlaps a previous one.
|
||||
if (hovered && (flags & ImGuiButtonFlags_AllowItemOverlap) && (g.HoveredIdPreviousFrame != id && g.HoveredIdPreviousFrame != 0))
|
||||
if (hovered && (flags & ImGuiButtonFlags_AllowItemOverlap) && g.HoveredIdPreviousFrame != id)
|
||||
hovered = false;
|
||||
|
||||
// Mouse handling
|
||||
|
Reference in New Issue
Block a user