Table of Contents

Struct GamePadThumbSticks

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

A struct that represents the current stick (thumbstick) states for the controller.

public struct GamePadThumbSticks
Inherited Members

Constructors

GamePadThumbSticks(Vector2, Vector2)

Initializes a new instance of the GamePadThumbSticks struct, setting positions of the sticks.

public GamePadThumbSticks(Vector2 leftPosition, Vector2 rightPosition)

Parameters

leftPosition Vector2

Position of the left controller stick.

rightPosition Vector2

Position of the right controller stick.

Properties

Left

Gets a value indicating the position of the left stick (thumbstick).

public Vector2 Left { get; }

Property Value

Vector2

A Vector2 indicating the current position of the left stick (thumbstick).

Right

Gets a value indicating the position of the right stick (thumbstick).

public Vector2 Right { get; }

Property Value

Vector2

A Vector2 indicating the current position of the right stick (thumbstick).

Methods

Equals(object)

Returns a value indicating whether this instance is equal to a specified object.

public override bool Equals(object obj)

Parameters

obj object

An object to compare to this instance.

Returns

bool

true if obj is a GamePadThumbSticks and has the same value as this instance; otherwise, false.

GetHashCode()

Serves as a hash function for a GamePadThumbSticks 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 GamePadThumbSticks.

public override string ToString()

Returns

string

A string that represents the current GamePadThumbSticks.

Operators

operator ==(GamePadThumbSticks, GamePadThumbSticks)

Determines whether two specified instances of GamePadThumbSticks are equal.

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

Parameters

left GamePadThumbSticks

The first object to compare.

right GamePadThumbSticks

The second object to compare.

Returns

bool

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

operator !=(GamePadThumbSticks, GamePadThumbSticks)

Determines whether two specified instances of GamePadThumbSticks are not equal.

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

Parameters

left GamePadThumbSticks

The first object to compare.

right GamePadThumbSticks

The second object to compare.

Returns

bool

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