Drag and drop: Handle overlapping drag target priorities given their surface, which appears to make most sense for drag and drop operations.

This commit is contained in:
omar
2017-11-08 15:47:52 +01:00
parent de1e7dc088
commit b6504b8eee
2 changed files with 13 additions and 2 deletions

View File

@ -480,6 +480,7 @@ struct ImGuiContext
ImGuiDragDropFlags DragDropSourceFlags;
int DragDropMouseButton;
ImGuiPayload DragDropPayload;
float DragDropAcceptIdCurrRectSurface;
ImGuiID DragDropAcceptIdCurr; // Target item id (set at the time of accepting the payload)
ImGuiID DragDropAcceptIdPrev; // Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets)
int DragDropAcceptFrameCount; // Last time a target expressed a desire to accept the source