The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Properties | List of all members
OpenTK.Input.GamePadState Struct Reference

Describes the current state of a GamePad device. More...

Inherits IEquatable< GamePadState >.

Public Member Functions

override string ToString ()
 Returns a System.String that represents the current OpenTK.Input.GamePadState. More...
 
override int GetHashCode ()
 Serves as a hash function for a OpenTK.Input.GamePadState object. More...
 
override bool Equals (object obj)
 Determines whether the specified System.Object is equal to the current OpenTK.Input.GamePadState. More...
 
bool Equals (GamePadState other)
 Determines whether the specified OpenTK.Input.GamePadState is equal to the current OpenTK.Input.GamePadState. More...
 
bool IsAxisValid (GamePadAxes axis)
 
bool IsDPadValid (int index)
 

Public Attributes

const float RangeMultiplier = 1.0f / (short.MaxValue + 1)
 
Buttons buttons
 
int packet_number
 
short left_stick_x
 
short left_stick_y
 
short right_stick_x
 
short right_stick_y
 
byte left_trigger
 
byte right_trigger
 
bool is_connected
 

Properties

GamePadThumbSticks ThumbSticks [get]
 Gets a GamePadThumbSticks structure describing the state of the GamePad thumb sticks. More...
 
GamePadButtons Buttons [get]
 Gets a GamePadButtons structure describing the state of the GamePad buttons. More...
 
GamePadDPad DPad [get]
 Gets a GamePadDPad structure describing the state of the GamePad directional pad. More...
 
GamePadTriggers Triggers [get]
 Gets a GamePadTriggers structure describing the state of the GamePad triggers. More...
 
bool IsConnected [get]
 Gets a value indicating whether this GamePad instance is connected. More...
 
int PacketNumber [get]
 Gets the packet number for this GamePadState instance. Use the packet number to determine whether the state of a GamePad device has changed. More...
 

Detailed Description

Describes the current state of a GamePad device.

Member Function Documentation

override bool OpenTK.Input.GamePadState.Equals ( object  obj)

Determines whether the specified System.Object is equal to the current OpenTK.Input.GamePadState.

Parameters
objThe System.Object to compare with the current OpenTK.Input.GamePadState.
Returns
true if the specified System.Object is equal to the current OpenTK.Input.GamePadState; otherwise, false.
bool OpenTK.Input.GamePadState.Equals ( GamePadState  other)

Determines whether the specified OpenTK.Input.GamePadState is equal to the current OpenTK.Input.GamePadState.

Parameters
otherThe OpenTK.Input.GamePadState to compare with the current OpenTK.Input.GamePadState.
Returns
true if the specified OpenTK.Input.GamePadState is equal to the current OpenTK.Input.GamePadState; otherwise, false.
override int OpenTK.Input.GamePadState.GetHashCode ( )

Serves as a hash function for a OpenTK.Input.GamePadState object.

Returns
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.
override string OpenTK.Input.GamePadState.ToString ( )

Returns a System.String that represents the current OpenTK.Input.GamePadState.

Returns
A System.String that represents the current OpenTK.Input.GamePadState.

Property Documentation

GamePadButtons OpenTK.Input.GamePadState.Buttons
get

Gets a GamePadButtons structure describing the state of the GamePad buttons.

GamePadDPad OpenTK.Input.GamePadState.DPad
get

Gets a GamePadDPad structure describing the state of the GamePad directional pad.

bool OpenTK.Input.GamePadState.IsConnected
get

Gets a value indicating whether this GamePad instance is connected.

true if this instance is connected; otherwise, false.

int OpenTK.Input.GamePadState.PacketNumber
get

Gets the packet number for this GamePadState instance. Use the packet number to determine whether the state of a GamePad device has changed.

GamePadThumbSticks OpenTK.Input.GamePadState.ThumbSticks
get

Gets a GamePadThumbSticks structure describing the state of the GamePad thumb sticks.

GamePadTriggers OpenTK.Input.GamePadState.Triggers
get

Gets a GamePadTriggers structure describing the state of the GamePad triggers.