1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-24 02:14:22 +00:00

Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)

This commit is contained in:
omar 2018-10-01 15:53:18 +02:00
parent 3dcd552628
commit e623be998d
3 changed files with 12 additions and 4 deletions

View file

@ -8265,6 +8265,12 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop
return &payload;
}
const ImGuiPayload* ImGui::GetDragDropPayload()
{
ImGuiContext& g = *GImGui;
return g.DragDropActive ? &g.DragDropPayload : NULL;
}
// We don't really use/need this now, but added it for the sake of consistency and because we might need it later.
void ImGui::EndDragDropTarget()
{