Synced
ImGuiWidget.DragDropTarget
Section titled “ImGuiWidget.DragDropTarget”
- Accepts an unmanaged payload on an explicit screen-space rectangle.
Required contracts
Section titled “Required contracts”API: scripting
Project: Inno.Editor.ImGui
Scope: Editor
Declaration
Section titled “Declaration”public bool InnoEditor.ImGui.ImGuiWidget.DragDropTarget<TPayload>(string payloadType, System.Numerics.Vector2 minimum, System.Numerics.Vector2 maximum, uint targetId, out TPayload payload, out bool isPreviewing, bool drawDefaultHighlight = true) where TPayload : structType parameters
Section titled “Type parameters”Type parameter TPayload: Unmanaged payload type.
Parameters
Section titled “Parameters”Parameter payloadType: Stable ImGui payload type identifier.
Parameter minimum: Minimum screen coordinate of the complete target.
Parameter maximum: Maximum screen coordinate of the complete target.
Parameter targetId: ImGui identifier unique within the current window.
Parameter payload: Previewed or delivered payload value.
Parameter isPreviewing: Whether a compatible payload is hovering over the target.
Parameter drawDefaultHighlight: Whether ImGui draws its default target rectangle.
Returns
Section titled “Returns”true only when a compatible payload is delivered.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentException: Thrown when payloadType is empty or whitespace.