Class DragScripts<U>
Helper class for handling Script instance drag and drop.
Namespace: FlaxEditor.GUI.Drag
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DragScripts<U> : DragHelper<Script, U> where U : DragEventArgs
Type Parameters
U
|
Constructors
DragScripts(Func<Script, Boolean>)
Creates a new DragHelper
Declaration
public DragScripts(Func<Script, bool> validateFunction)
Parameters
System.Func<Script, System.Boolean>
validateFunction
The validation function |
Fields
DragPrefix
The default prefix for drag data used for Script.
Declaration
public const string DragPrefix = "SCRIPT!?"
Field Value
System.String
|
Methods
FromDragData(DragData)
Tries to parse the drag data.
Declaration
public override IEnumerable<Script> FromDragData(DragData data)
Parameters
DragData
data
The data. |
Returns
System.Collections.Generic.IEnumerable<Script>
Gathered objects or empty IEnumerable if cannot get any valid. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEngine.Script, U>.FromDragData(FlaxEngine.GUI.DragData)
GetDragData(Script)
Gets the drag data.
Declaration
public static DragData GetDragData(Script item)
Parameters
Script
item
The script. |
Returns
DragData
The data. |
GetDragData(IEnumerable<Script>)
Gets the drag data.
Declaration
public static DragData GetDragData(IEnumerable<Script> items)
Parameters
System.Collections.Generic.IEnumerable<Script>
items
The items. |
Returns
DragData
The data. |
IsValidData(DragDataText)
Tries to parse the drag data to validate if it has valid scripts drag.
Declaration
public static bool IsValidData(DragDataText data)
Parameters
DragDataText
data
The data. |
Returns
System.Boolean
True if drag data has valid scripts, otherwise false. |
ToDragData(Script)
Gets the drag data.
Declaration
public override DragData ToDragData(Script item)
Parameters
Script
item
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEngine.Script, U>.ToDragData(FlaxEngine.Script)
ToDragData(IEnumerable<Script>)
Gets the drag data.
Declaration
public override DragData ToDragData(IEnumerable<Script> items)
Parameters
System.Collections.Generic.IEnumerable<Script>
items
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEngine.Script, U>.ToDragData(System.Collections.Generic.IEnumerable<FlaxEngine.Script>)