API reference
Preparing search index…

ImGui.BeginDragDropSource

  • Begin a drag-and-drop source.

    Parameters

    flags
    number = 0

    ImGuiDragDropFlags options controlling this operation; combine compatible flag bits with |.

    Returns

    boolean

    True while this item is an active drag source and may submit its payload/preview. Call EndDragDropSource() only when true.

    • On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().

    • On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().

    • If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)

    • An item can be both drag source and drop target.

    call after submitting an item which may be dragged. when this return true, you can call SetDragDropPayload() + EndDragDropSource()

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0