1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/Input/GamePadState.h
Halofreak1990 1c277b2038 Fixed a couple of errors, removed Dictionary references from the ContentManager to get it to compile.
Now, the only thing keeping XFX from a full compile is my stupid attempt at Asynchronous IO. Will look at that, but most likely, I will comment it out and just get a new Demo out before New Year.
2010-12-27 01:01:25 +00:00

46 lines
1.3 KiB
C++

/********************************************************
* GamePadState.h *
* *
* XFX GamePadState definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_INPUT_GAMEPADSTATE_
#define _XFX_INPUT_GAMEPADSTATE_
#include "GamePadButtons.h"
namespace XFX
{
namespace Input
{
/// <summary>
/// Represents specific information about the state of an Xbox Controller, including the current state of buttons
/// and sticks.
/// </summary>
struct GamePadState
{
GamePadButtons Buttons;
GamePadDPad DPad;
bool IsConnected;
GamePadThumbSticks ThumbSticks;
GamePadTriggers Triggers;
GamePadState(GamePadThumbSticks thumbSticks, GamePadTriggers triggers, GamePadButtons buttons, GamePadDPad dPad);
GamePadState(Vector2 leftThumbStick, Vector2 rightThumbStick, float leftTrigger, float rightTrigger, Buttons_t buttons[]);
GamePadState();
GamePadState(const GamePadState &obj);
bool Equals(const GamePadState obj);
int GetHashCode();
bool IsButtonDown(Buttons_t button);
bool IsButtonUp(Buttons_t button);
bool operator==(const GamePadState other);
bool operator!=(const GamePadState other);
};
}
}
#endif //_XFX_INPUT_GAMEPADSTATE_