2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* GamePadState.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX GamePadState definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
2010-12-27 01:01:25 +00:00
|
|
|
|
#ifndef _XFX_INPUT_GAMEPADSTATE_
|
|
|
|
|
#define _XFX_INPUT_GAMEPADSTATE_
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
#include "GamePadButtons.h"
|
|
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
namespace Input
|
|
|
|
|
{
|
2012-03-29 22:02:43 +00:00
|
|
|
|
// Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks.
|
2012-09-28 20:36:02 +00:00
|
|
|
|
struct GamePadState : Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
GamePadButtons Buttons;
|
|
|
|
|
GamePadDPad DPad;
|
|
|
|
|
bool IsConnected;
|
|
|
|
|
GamePadThumbSticks ThumbSticks;
|
|
|
|
|
GamePadTriggers Triggers;
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
GamePadState(const GamePadThumbSticks thumbSticks, const GamePadTriggers triggers, const GamePadButtons buttons, const GamePadDPad dPad);
|
2010-12-27 01:01:25 +00:00
|
|
|
|
GamePadState();
|
|
|
|
|
GamePadState(const GamePadState &obj);
|
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
bool Equals(const Object* obj) const;
|
|
|
|
|
bool Equals(const GamePadState obj) const;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
int GetHashCode() const;
|
2012-09-28 20:36:02 +00:00
|
|
|
|
int GetType() const;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
bool IsButtonDown(const Buttons_t button) const;
|
|
|
|
|
bool IsButtonUp(const Buttons_t button) const;
|
|
|
|
|
const char* ToString() const;
|
2010-12-27 01:01:25 +00:00
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
bool operator==(const GamePadState& right) const;
|
|
|
|
|
bool operator!=(const GamePadState& right) const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
inline GamePadState operator =(const GamePadState right)
|
|
|
|
|
{
|
|
|
|
|
return (*this == right) ? *this : GamePadState(right);
|
|
|
|
|
}
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
#endif //_XFX_INPUT_GAMEPADSTATE_
|