Drag and Drop: Rework drop target highlight. (#4281, #3272)

Amend 4ddb6b46, 4b94738c7
This commit is contained in:
ocornut
2023-10-05 14:13:27 +02:00
parent 0dd756bceb
commit 085ed7bfbe
3 changed files with 16 additions and 4 deletions

View File

@ -2437,6 +2437,7 @@ static void ShowDemoWindowWidgets()
ImGuiDragDropFlags drop_target_flags = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoPreviewTooltip;
if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F, drop_target_flags))
{
IM_UNUSED(payload);
ImGui::SetMouseCursor(ImGuiMouseCursor_NotAllowed);
ImGui::BeginTooltip();
ImGui::Text("Cannot drop here!");