Class DragAssets<U>
Helper class for handling FlaxEditor.Content.AssetItem drag and drop.
Inheritance
System.Object
FlaxEditor.GUI.Drag.DragHelper
DragHelper<FlaxEditor.Content.AssetItem, U>
DragAssets<U>
Namespace: FlaxEditor.GUI.Drag
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DragAssets<U> : DragHelper<AssetItem, U> where U : DragEventArgs
Type Parameters
U
|
Constructors
DragAssets(Func<AssetItem, Boolean>)
Creates a new DragHelper
Declaration
public DragAssets(Func<AssetItem, bool> validateFunction)
Parameters
System.Func<FlaxEditor.Content.AssetItem, System.Boolean>
validateFunction
The validation function |
Fields
DragPrefix
The default prefix for drag data used for FlaxEditor.Content.ContentItem.
Declaration
public const string DragPrefix = "ASSET!?"
Field Value
System.String
|
Methods
FromDragData(DragData)
Tries to parse the drag data to extract FlaxEditor.Content.AssetItem collection.
Declaration
public override IEnumerable<AssetItem> FromDragData(DragData data)
Parameters
DragData
data
The data. |
Returns
System.Collections.Generic.IEnumerable<FlaxEditor.Content.AssetItem>
Gathered objects or empty array if cannot get any valid. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.AssetItem, U>.FromDragData(FlaxEngine.GUI.DragData)
GetDragData(AssetItem)
Gets the drag data.
Declaration
public static DragData GetDragData(AssetItem item)
Parameters
FlaxEditor.Content.AssetItem
item
The item. |
Returns
DragData
The data. |
GetDragData(Asset)
Gets the drag data.
Declaration
public static DragData GetDragData(Asset asset)
Parameters
Asset
asset
The asset. |
Returns
DragData
The data. |
GetDragData(IEnumerable<AssetItem>)
Gets the drag data.
Declaration
public static DragData GetDragData(IEnumerable<AssetItem> items)
Parameters
System.Collections.Generic.IEnumerable<FlaxEditor.Content.AssetItem>
items
The items. |
Returns
DragData
The data. |
ToDragData(AssetItem)
Gets the drag data.
Declaration
public override DragData ToDragData(AssetItem item)
Parameters
FlaxEditor.Content.AssetItem
item
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.AssetItem, U>.ToDragData(FlaxEditor.Content.AssetItem)
ToDragData(Asset)
Gets the drag data (finds asset item).
Declaration
public DragData ToDragData(Asset asset)
Parameters
Asset
asset
The asset. |
Returns
DragData
The data. |
ToDragData(IEnumerable<AssetItem>)
Gets the drag data.
Declaration
public override DragData ToDragData(IEnumerable<AssetItem> items)
Parameters
System.Collections.Generic.IEnumerable<FlaxEditor.Content.AssetItem>
items
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.AssetItem, U>.ToDragData(System.Collections.Generic.IEnumerable<FlaxEditor.Content.AssetItem>)
Extension Methods
See Also
FlaxEditor.Content.AssetItem