mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Drag and Drop: Calling BeginTooltip() between a BeginDragSource()/EndDragSource() or BeginDropTarget()/EndDropTarget() uses adjusted tooltip settings matching the one created when calling BeginDragSource() without the ImGuiDragDropFlags_SourceNoPreviewTooltip flag. (#143) + additional safety checks.
This commit is contained in:
@ -692,6 +692,7 @@ struct ImGuiContext
|
||||
|
||||
// Drag and Drop
|
||||
bool DragDropActive;
|
||||
bool DragDropWithinSourceOrTarget;
|
||||
ImGuiDragDropFlags DragDropSourceFlags;
|
||||
int DragDropMouseButton;
|
||||
ImGuiPayload DragDropPayload;
|
||||
@ -810,7 +811,7 @@ struct ImGuiContext
|
||||
OverlayDrawList._OwnerName = "##Overlay"; // Give it a name for debugging
|
||||
MouseCursor = ImGuiMouseCursor_Arrow;
|
||||
|
||||
DragDropActive = false;
|
||||
DragDropActive = DragDropWithinSourceOrTarget = false;
|
||||
DragDropSourceFlags = 0;
|
||||
DragDropMouseButton = -1;
|
||||
DragDropTargetId = 0;
|
||||
@ -1130,8 +1131,6 @@ namespace ImGui
|
||||
IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void ClearDragDrop();
|
||||
IMGUI_API bool IsDragDropPayloadBeingAccepted();
|
||||
IMGUI_API void BeginDragDropTooltip();
|
||||
IMGUI_API void EndDragDropTooltip();
|
||||
|
||||
// FIXME-WIP: New Columns API
|
||||
IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
|
||||
|
Reference in New Issue
Block a user