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