Class FocusChangeDirection
Base class for defining in which direction the focus moves in a focus ring.
Namespace: UnityEngine.UIElements
Syntax
public class FocusChangeDirection : IDisposable
Remarks
Focus ring implementations can move the focus in various direction; they can derive from this class to formalize the various ways the focus can change from one element to the other.
Constructors
FocusChangeDirection(Int32)
Declaration
protected FocusChangeDirection(int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | value |
Properties
lastValue
Last value for the direction defined by this class.
Declaration
protected static FocusChangeDirection lastValue { get; }
Property Value
Type | Description |
---|---|
FocusChangeDirection |
none
The null direction. This is usually used when the focus stays on the same element.
Declaration
public static FocusChangeDirection none { get; }
Property Value
Type | Description |
---|---|
FocusChangeDirection |
unspecified
Focus came from an unspecified direction, for example after a mouse down.
Declaration
public static FocusChangeDirection unspecified { get; }
Property Value
Type | Description |
---|---|
FocusChangeDirection |
Methods
Dispose()
This method will be called when FocusController has finished treating this focus change directive. If the reference came from a pool, this method can be used to release the data back to the pool.
Declaration
protected virtual void Dispose()
Operators
Implicit(FocusChangeDirection to Int32)
Declaration
public static implicit operator int (FocusChangeDirection fcd)
Parameters
Type | Name | Description |
---|---|---|
FocusChangeDirection | fcd |
Returns
Type | Description |
---|---|
Int32 |