Skip to content
API referenceDevelopmentEditor scriptingEngine ccf7d03f
Synced
  • Publishes an unmanaged drag payload for the most recently submitted item.

API: scripting
Project: Inno.Editor.ImGui
Scope: Editor

public bool InnoEditor.ImGui.ImGuiWidget.DragDropSource<TPayload>(string payloadType, in TPayload payload, System.Action? drawPreview = null, bool allowHoldToOpenOthers = true) where TPayload : struct

Type parameter TPayload: Unmanaged payload type.

Parameter payloadType: Stable ImGui payload type identifier.

Parameter payload: Payload value.

Parameter drawPreview: Optional preview drawing callback.

Parameter allowHoldToOpenOthers: Whether hovering over another openable control may open it after the native drag-hold delay.

true while the item is an active drag source.

Exception T:System.ArgumentException: Thrown when payloadType is empty or whitespace.