Click or drag to resize

ControllerHat Class

A hat is a compound element made up of 4 or 8 individual buttons. If this is a 4-way hat, only up, down, right, and left are supported. Corner presses will activate the two cardinal directions. If this is an 8-way hat, all 8 directions are supported. Corner presses will activate the corner buttons.
Inheritance Hierarchy
SystemObject
  RewiredControllerCompoundElement
    RewiredControllerHat

Namespace:  Rewired
Assembly:  Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class Hat : ControllerCompoundElement

The ControllerHat type exposes the following members.

Properties
  NameDescription
Public propertybuttonDown
The button for the down direction. This value may be null if no button is assigned.
Public propertybuttonDownLeft
The button for the down-left direction. This value may be null if no button is assigned.
Public propertybuttonDownRight
The button for the down-right direction. This value may be null if no button is assigned.
Public propertybuttonLeft
The button for the left direction. This value may be null if no button is assigned.
Public propertybuttonRight
The button for the right direction. This value may be null if no button is assigned.
Public propertyButtons
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.
Public propertybuttonUp
The button for the up direction. This value may be null if no button is assigned.
Public propertybuttonUpLeft
The button for the up-left direction. This value may be null if no button is assigned.
Public propertybuttonUpRight
The button for the up-right direction. This value may be null if no button is assigned.
Public propertydirectionCount
The number of directions supported by this hat. This can be 4, 8, or 0.
Public propertyelementCapacity
The maximum number of member Buttons of the Hat.
(Overrides ControllerCompoundElementelementCapacity.)
Public propertyelementCount
The number of member elements in this compound element.
(Inherited from ControllerCompoundElement.)
Public propertyelementIdentifier
The controller element identifier.
(Inherited from ControllerCompoundElement.)
Public propertyforce4Way
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.
Public propertyhasElements
Does this compound element have any member elements?
(Inherited from ControllerCompoundElement.)
Public propertyid
The element identifier id.
(Inherited from ControllerCompoundElement.)
Public propertyname
The name of this element.
(Inherited from ControllerCompoundElement.)
Public propertytype
The type of this element.
(Inherited from ControllerCompoundElement.)
Top
See Also