Class DragScriptItems<U>
Helper class for handling ScriptItem drag and drop.
Inheritance
Namespace: FlaxEditor.GUI.Drag
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DragScriptItems<U> : DragHelper<ScriptItem, U> where U : DragEventArgs
Type Parameters
U
|
Constructors
DragScriptItems(Func<ScriptItem, Boolean>)
Creates a new DragHelper
Declaration
public DragScriptItems(Func<ScriptItem, bool> validateFunction)
Parameters
System.Func<ScriptItem, 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.
Declaration
public override IEnumerable<ScriptItem> FromDragData(DragData data)
Parameters
DragData
data
The data. |
Returns
System.Collections.Generic.IEnumerable<ScriptItem>
Gathered objects or empty IEnumerable if cannot get any valid. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ScriptItem, U>.FromDragData(FlaxEngine.GUI.DragData)
GetDragData(ScriptItem)
Gets the drag data.
Declaration
public static DragData GetDragData(ScriptItem item)
Parameters
ScriptItem
item
The item. |
Returns
DragData
The data. |
GetDragData(IEnumerable<ScriptItem>)
Gets the drag data.
Declaration
public static DragData GetDragData(IEnumerable<ScriptItem> items)
Parameters
System.Collections.Generic.IEnumerable<ScriptItem>
items
The items. |
Returns
DragData
The data. |
ToDragData(ScriptItem)
Gets the drag data.
Declaration
public override DragData ToDragData(ScriptItem item)
Parameters
ScriptItem
item
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ScriptItem, U>.ToDragData(FlaxEditor.Content.ScriptItem)
ToDragData(IEnumerable<ScriptItem>)
Gets the drag data.
Declaration
public override DragData ToDragData(IEnumerable<ScriptItem> items)
Parameters
System.Collections.Generic.IEnumerable<ScriptItem>
items
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ScriptItem, U>.ToDragData(System.Collections.Generic.IEnumerable<FlaxEditor.Content.ScriptItem>)