Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
KatanaEngine::GamePadState Struct Reference

Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks. More...

#include <GamePadState.h>

Public Member Functions

bool IsButtonDown (Button button) const
 Determines if a button is pressed down.
 
bool IsButtonUp (Button button) const
 Determines if a button is up.
 
void Reset ()
 

Public Attributes

bool IsConnected
 True if the GamePad is connected, false otherwise.
 
GamePadButtons Buttons
 The current state of the GamePad's Buttons.
 
GamePadThumbSticks Thumbsticks
 The current state of the GamePad's Thumbsticks.
 
GamePadTriggers Triggers
 The current state of the GamePad's Triggers.
 
GamePadDPad DPad
 The current state of the GamePad's DPad.
 
ALLEGRO_JOYSTICK * ID
 The underlaying allegro joystick id.
 

Detailed Description

Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks.

See also
Button
ButtonState
GamePadDPad
GamePadTriggers
GamePadThumbSticks
GamePadButtons

Definition at line 128 of file GamePadState.h.

Member Function Documentation

◆ IsButtonDown()

bool KatanaEngine::GamePadState::IsButtonDown ( Button button) const
inline

Determines if a button is pressed down.

Parameters
buttonThe button to test.
Returns
Returns true if the button is down, false otherwise.

Definition at line 140 of file GamePadState.h.

◆ IsButtonUp()

bool KatanaEngine::GamePadState::IsButtonUp ( Button button) const
inline

Determines if a button is up.

Parameters
buttonThe button to test.
Returns
Returns true if the button is up, false otherwise.

Definition at line 169 of file GamePadState.h.

◆ Reset()

void KatanaEngine::GamePadState::Reset ( )
inline

Definition at line 171 of file GamePadState.h.

Member Data Documentation

◆ Buttons

GamePadButtons KatanaEngine::GamePadState::Buttons

The current state of the GamePad's Buttons.

Definition at line 131 of file GamePadState.h.

◆ DPad

GamePadDPad KatanaEngine::GamePadState::DPad

The current state of the GamePad's DPad.

Definition at line 134 of file GamePadState.h.

◆ ID

ALLEGRO_JOYSTICK* KatanaEngine::GamePadState::ID

The underlaying allegro joystick id.

Definition at line 135 of file GamePadState.h.

◆ IsConnected

bool KatanaEngine::GamePadState::IsConnected

True if the GamePad is connected, false otherwise.

Definition at line 130 of file GamePadState.h.

◆ Thumbsticks

GamePadThumbSticks KatanaEngine::GamePadState::Thumbsticks

The current state of the GamePad's Thumbsticks.

Definition at line 132 of file GamePadState.h.

◆ Triggers

GamePadTriggers KatanaEngine::GamePadState::Triggers

The current state of the GamePad's Triggers.

Definition at line 133 of file GamePadState.h.


The documentation for this struct was generated from the following file: