ControllerHat Class |
Namespace: Rewired
public sealed class Hat : ControllerCompoundElement
The ControllerHat type exposes the following members.
Name | Description | |
---|---|---|
![]() | buttonDown |
The button for the down direction. This value may be null if no button is assigned.
|
![]() | buttonDownLeft |
The button for the down-left direction. This value may be null if no button is assigned.
|
![]() | buttonDownRight |
The button for the down-right direction. This value may be null if no button is assigned.
|
![]() | buttonLeft |
The button for the left direction. This value may be null if no button is assigned.
|
![]() | buttonRight |
The button for the right direction. This value may be null if no button is assigned.
|
![]() | Buttons |
Gets the list of member buttons.
There is one entry for each possible direction button in this hat.
Check directionCount to determine whether this is a 4 or 8-way hat.
Entries may be null if no button is assigned to a direction.
The order of the buttons starts at up and rotates clockwise.
|
![]() | buttonUp |
The button for the up direction. This value may be null if no button is assigned.
|
![]() | buttonUpLeft |
The button for the up-left direction. This value may be null if no button is assigned.
|
![]() | buttonUpRight |
The button for the up-right direction. This value may be null if no button is assigned.
|
![]() | directionCount |
The number of directions supported by this hat.
This can be 4, 8, or 0.
|
![]() | elementCapacity |
The maximum number of member Buttons of the Hat.
(Overrides ControllerCompoundElementelementCapacity.) |
![]() | elementCount |
The number of member elements in this compound element.
(Inherited from ControllerCompoundElement.) |
![]() | elementIdentifier |
The controller element identifier.
(Inherited from ControllerCompoundElement.) |
![]() | force4Way |
Force this hat to behave as a 4-way hat. This only has any effect if the hat is an 8-way hat.
If enabled, the corner directions will activate the adjacent 2 cardinal direction buttons instead of the corner button.
This is useful if you need the hat to behave like a D-Pad instead of an 8-way hat.
If the global ReInput.configuration.force4WayHats is enabled, setting this to false will have no effect as the global flag overrides this value.
|
![]() | hasElements |
Does this compound element have any member elements?
(Inherited from ControllerCompoundElement.) |
![]() | id |
The element identifier id.
(Inherited from ControllerCompoundElement.) |
![]() | name |
The name of this element.
(Inherited from ControllerCompoundElement.) |
![]() | type |
The type of this element.
(Inherited from ControllerCompoundElement.) |