A control made up of four discrete, directional buttons. Forms a vector
but can also be addressed as individual buttons.
Inheritance
System.Object
DpadControl
 
public class DpadControl : Vector2Control
 
Constructors
  
Declaration
Properties
  
The button representing the vertical downwards state of the D-Pad.
Declaration
public ButtonControl down { get; }
 
Property Value
The button representing the horizontal left state of the D-Pad.
Declaration
public ButtonControl left { get; }
 
Property Value
The button representing the horizontal right state of the D-Pad.
Declaration
public ButtonControl right { get; }
 
Property Value
Declaration
public ButtonControl up { get; }
 
Property Value
Methods
  
Declaration
protected override void FinishSetup(InputDeviceBuilder builder)
 
Parameters
Overrides
Create a direction vector from the given four button states.
Declaration
public static Vector2 MakeDpadVector(bool up, bool down, bool left, bool right, bool normalize = true)
 
Parameters
| Type | Name | Description | 
| System.Boolean | up |  | 
| System.Boolean | down |  | 
| System.Boolean | left |  | 
| System.Boolean | right |  | 
| System.Boolean | normalize |  | 
Returns
| Type | Description | 
| Vector2 | A normalized 2D direction vector. | 
Declaration
public override Vector2 ReadUnprocessedValueFromState(void *statePtr)
 
Parameters
| Type | Name | Description | 
| System.Void* | statePtr |  | 
Returns
Overrides
Declaration
public override void WriteValueIntoState(Vector2 value, void *statePtr)
 
Parameters
| Type | Name | Description | 
| Vector2 | value |  | 
| System.Void* | statePtr |  | 
Overrides
Extension Methods