Drag and Drop: made BeginDragDropSource() clear the IsItemHovered() by default, added a flag to keep it.

This commit is contained in:
omar
2017-10-29 21:31:49 +01:00
parent c5536e49ef
commit b5f714e9f9
2 changed files with 9 additions and 2 deletions

View File

@ -10631,6 +10631,10 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags, int mouse_button)
PushStyleColor(ImGuiCol_PopupBg, GetStyleColorVec4(ImGuiCol_PopupBg) * ImVec4(1.0f, 1.0f, 1.0f, 0.6f));
BeginTooltipEx(ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_ShowBorders);
}
if (!(flags & ImGuiDragDropFlags_SourceNoDisableHover))
window->DC.LastItemRectHoveredRect = false;
return true;
}
return false;