JoystickState

struct JoystickState : System.ValueType

Describes current joystick state.

readonly bool IsConnected

Gets a value indicating whether the joystick is connected.

Value:true if the joystick is connected; otherwise, false.
readonly System.Int32[] Axes

Gets the joystick axis values.

Value:An array list of ints that indicate axis values.
readonly Microsoft.Xna.Framework.Input.ButtonState[] Buttons

Gets the joystick button values.

Value:An array list of ButtonState that indicate button values.
readonly Microsoft.Xna.Framework.Input.JoystickHat[] Hats

Gets the joystick hat values.

Value:An array list of T:Microsoft.Xna.Framework.Input.JoystickHat that indicate hat values.
void set_IsConnected(bool value)
Parameters:
  • value (bool) –
void set_Axes(System.Int32[] value)
Parameters:
  • value (System.Int32[]) –
void set_Buttons(Microsoft.Xna.Framework.Input.ButtonState[] value)
Parameters:
  • value (Microsoft.Xna.Framework.Input.ButtonState[]) –
void set_Hats(Microsoft.Xna.Framework.Input.JoystickHat[] value)
Parameters:
  • value (Microsoft.Xna.Framework.Input.JoystickHat[]) –
bool op_Equality(JoystickState left, JoystickState right)

Determines whether a specified instance of T:Microsoft.Xna.Framework.Input.JoystickState is equal to another specified T:Microsoft.Xna.Framework.Input.JoystickState.

Parameters:
  • left (Microsoft.Xna.Framework.Input.JoystickState) – The first T:Microsoft.Xna.Framework.Input.JoystickState to compare.
  • right (Microsoft.Xna.Framework.Input.JoystickState) – The second T:Microsoft.Xna.Framework.Input.JoystickState to compare.
Returns:

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

bool op_Inequality(JoystickState left, JoystickState right)

Determines whether a specified instance of T:Microsoft.Xna.Framework.Input.JoystickState is not equal to another specified T:Microsoft.Xna.Framework.Input.JoystickState.

Parameters:
  • left (Microsoft.Xna.Framework.Input.JoystickState) – The first T:Microsoft.Xna.Framework.Input.JoystickState to compare.
  • right (Microsoft.Xna.Framework.Input.JoystickState) – The second T:Microsoft.Xna.Framework.Input.JoystickState to compare.
Returns:

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

bool Equals(System.Object obj)

Determines whether the specified T:System.Object is equal to the current T:Microsoft.Xna.Framework.Input.JoystickState.

Parameters:
  • obj (System.Object) – The T:System.Object to compare with the current T:Microsoft.Xna.Framework.Input.JoystickState.
Returns:
true if the specified T:System.Object is equal to the current

T:Microsoft.Xna.Framework.Input.JoystickState; otherwise, false.

int GetHashCode()

Serves as a hash function for a T:Microsoft.Xna.Framework.Input.JoystickState object.

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

hash table.

string ToString()

Returns a T:System.String that represents the current T:Microsoft.Xna.Framework.Input.JoystickState.

Returns:A T:System.String that represents the current T:Microsoft.Xna.Framework.Input.JoystickState.