Class FocusEventBase<T>
Base class for focus related events.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public abstract class FocusEventBase<T> : EventBase<T>, IFocusEvent where T : FocusEventBase<T>, new()
Type Parameters
Name | Description |
---|---|
T |
Constructors
FocusEventBase()
Declaration
protected FocusEventBase()
Properties
direction
Direction of the focus change.
Declaration
public FocusChangeDirection direction { get; }
Property Value
Type | Description |
---|---|
FocusChangeDirection |
Implements
focusController
The focus controller that emitted the event.
Declaration
protected FocusController focusController { get; }
Property Value
Type | Description |
---|---|
FocusController |
relatedTarget
For FocusOut and Blur events, contains the element that gains the focus. For FocusIn and Focus events, contains the element that loses the focus.
Declaration
public Focusable relatedTarget { get; }
Property Value
Type | Description |
---|---|
Focusable |
Implements
Methods
GetPooled(IEventHandler, Focusable, FocusChangeDirection, FocusController, Boolean)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained using this method need to be released back to the pool. You can use Dispose()
to release them.
Declaration
public static T GetPooled(IEventHandler target, Focusable relatedTarget, FocusChangeDirection direction, FocusController focusController, bool bIsFocusDelegated = false)
Parameters
Type | Name | Description |
---|---|---|
IEventHandler | target | The event target. |
Focusable | relatedTarget | The related target. |
FocusChangeDirection | direction | The direction of the focus change. |
FocusController | focusController | The object that manages the focus. |
Boolean | bIsFocusDelegated |
Returns
Type | Description |
---|---|
T | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()
Overrides
UnityEngine.UIElements.EventBase<T>.Init()