mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Drag and Drop: moved "drag souce doesn't report as hovered" from ButtonBehavior() to ItemHoverable().
Ensure DragXXX, SliderXXXX, InputText, PlotXXX follow same logic. Amend251f178a6
,a33f0d1f7
This commit is contained in:
@ -4050,6 +4050,10 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Drag source doesn't report as hovered
|
||||
if (g.DragDropActive && g.DragDropPayload.SourceId == id && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoDisableHover))
|
||||
return false;
|
||||
|
||||
// We exceptionally allow this function to be called with id==0 to allow using it for easy high-level
|
||||
// hover test in widgets code. We could also decide to split this function is two.
|
||||
if (id != 0)
|
||||
|
Reference in New Issue
Block a user