Table of Contents

Struct JoystickHat

Namespace
Microsoft.Xna.Framework.Input
Assembly
MonoGame.Framework.dll

Describes joystick hat state.

public struct JoystickHat
Inherited Members

Properties

Down

Gets if joysticks hat "down" is pressed.

public readonly ButtonState Down { get; }

Property Value

ButtonState

Pressed if the button is pressed otherwise, Released.

Left

Gets if joysticks hat "left" is pressed.

public readonly ButtonState Left { get; }

Property Value

ButtonState

Pressed if the button is pressed otherwise, Released.

Right

Gets if joysticks hat "right" is pressed.

public readonly ButtonState Right { get; }

Property Value

ButtonState

Pressed if the button is pressed otherwise, Released.

Up

Gets if joysticks hat "up" is pressed.

public readonly ButtonState Up { get; }

Property Value

ButtonState

Pressed if the button is pressed otherwise, Released.

Methods

Equals(object)

Determines whether the specified object is equal to the current JoystickHat.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current JoystickHat.

Returns

bool

true if the specified object is equal to the current JoystickHat; otherwise, false.

GetHashCode()

Serves as a hash function for a JoystickHat object.

public override int GetHashCode()

Returns

int

A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.

ToString()

Returns a string that represents the current JoystickHat in a format of 0000 where each number represents a boolean value of each respecting object property: Left, Up, Right, Down.

public override string ToString()

Returns

string

A string that represents the current JoystickHat.

Operators

operator ==(JoystickHat, JoystickHat)

Determines whether a specified instance of JoystickHat is equal to another specified JoystickHat.

public static bool operator ==(JoystickHat left, JoystickHat right)

Parameters

left JoystickHat

The first JoystickHat to compare.

right JoystickHat

The second JoystickHat to compare.

Returns

bool

true if left and right are equal; otherwise, false.

operator !=(JoystickHat, JoystickHat)

Determines whether a specified instance of JoystickHat is not equal to another specified JoystickHat.

public static bool operator !=(JoystickHat left, JoystickHat right)

Parameters

left JoystickHat

The first JoystickHat to compare.

right JoystickHat

The second JoystickHat to compare.

Returns

bool

true if left and right are not equal; otherwise, false.