Class UIControl
Contains a single GUI control (on C# side).
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/UI/UI Control")]
[ActorToolbox("GUI", "Empty UIControl")]
[Unmanaged]
public sealed class UIControl : Actor, ISerializable
Constructors
UIControl()
Fields
FallbackParentGetDelegate
The fallback callback used to handle UIControl parent container control to link when it fails to find the default parent. Can be used to link the controls into a custom control.
Declaration
public static Func<UIControl, ContainerControl> FallbackParentGetDelegate
Field Value
System.Func<UIControl, ContainerControl>
|
Properties
Bounds
Gets the world-space oriented bounding box that contains a 3D control.
Declaration
public OrientedBoundingBox Bounds { get; }
Property Value
OrientedBoundingBox
|
Control
Gets or sets the GUI control used by this actor.
Declaration
[EditorDisplay("Control", "__inline__")]
[CustomEditorAlias("FlaxEditor.CustomEditors.Dedicated.UIControlControlEditor")]
[EditorOrder(50)]
public Control Control { get; set; }
Property Value
Control
|
Remarks
When changing the control, the previous one is disposed. Use UnlinkControl() to manage it on your own.
HasControl
Gets a value indicating whether this actor has control.
Declaration
public bool HasControl { get; }
Property Value
System.Boolean
|
NavTargetDown
NavTargetLeft
NavTargetRight
NavTargetUp
Methods
AddChildControl<T>()
Creates a new UIControl with the control of the given type and links it to this control as a child.
Declaration
public UIControl AddChildControl<T>()
where T : Control
Returns
UIControl
The created UIControl that contains a new control of the given type. |
Type Parameters
T
Type of the child control to add. |
Remarks
The current actor has to have a valid container control.
Get<T>()
Gets the control object cased to the given type.
Declaration
public T Get<T>()
where T : Control
Returns
T
The control object. |
Type Parameters
T
The type of the control. |
Is<T>()
Checks if the control object is of the given type.
Declaration
public bool Is<T>()
where T : Control
Returns
System.Boolean
True if control object is of the given type. |
Type Parameters
T
The type of the control. |
UnlinkControl()
Unlinks the control from the actor without disposing it or modifying.
Declaration
[NoAnimate]
public void UnlinkControl()