mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 13:35:49 +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:
@ -506,10 +506,6 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
bool pressed = false;
|
||||
bool hovered = ItemHoverable(bb, id);
|
||||
|
||||
// Drag source doesn't report as hovered
|
||||
if (hovered && g.DragDropActive && g.DragDropPayload.SourceId == id && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoDisableHover))
|
||||
hovered = false;
|
||||
|
||||
// Special mode for Drag and Drop where holding button pressed for a long time while dragging another item triggers the button
|
||||
if (g.DragDropActive && (flags & ImGuiButtonFlags_PressedOnDragDropHold) && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoHoldToOpenOthers))
|
||||
if (IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
|
||||
|
Reference in New Issue
Block a user