-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Labels
Description
Version/Branch of Dear ImGui:
Version: 1.88 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
Compiler: MSVC
Operating System: Windows 10
My Issue/Question:
If we drag item from from floating window that isn't fully located under main window, then drop to another window doesn't work
Screenshots/Video
2022-09-26.14-59-54.mp4
Standalone, minimal, complete and verifiable example: (see #2261)
ImGui::Begin("Asset Browser");
if (ImGui::Button("Drag this"))
{
}
int dndData = 1;
if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_None))
{
ImGui::SetDragDropPayload("DND_TEST", &dndData, sizeof(int));
ImGui::EndDragDropSource();
}
ImGui::End();
ImGui::Begin("Viewport");
ImGui::Text("Dropped count: %d", droppedCount);
if (ImGui::Button("Drop Here"))
{
}
if (ImGui::BeginDragDropTarget())
{
if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("DND_TEST"))
{
droppedCount += *(const int*)payload->Data;
}
ImGui::EndDragDropTarget();
}
ImGui::End();