2013-06-02 14:32:43 +02:00
|
|
|
/*****************************************************************************
|
2013-08-13 20:04:25 +02:00
|
|
|
* GamePadState.h *
|
2013-06-02 14:32:43 +02:00
|
|
|
* *
|
2013-07-12 21:30:13 +02:00
|
|
|
* XFX::Input::GamePadState structure definition file *
|
2013-06-02 14:32:43 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_INPUT_GAMEPADSTATE_
|
|
|
|
#define _XFX_INPUT_GAMEPADSTATE_
|
|
|
|
|
|
|
|
#include "GamePadButtons.h"
|
2013-08-13 20:04:25 +02:00
|
|
|
#include "GamePadDPad.h"
|
|
|
|
#include "GamePadThumbSticks.h"
|
|
|
|
#include "GamePadTriggers.h"
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
namespace Input
|
|
|
|
{
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct GamePadState : Object
|
|
|
|
{
|
|
|
|
GamePadButtons Buttons;
|
|
|
|
GamePadDPad DPad;
|
|
|
|
bool IsConnected;
|
|
|
|
GamePadThumbSticks ThumbSticks;
|
|
|
|
GamePadTriggers Triggers;
|
|
|
|
|
|
|
|
GamePadState(const GamePadThumbSticks thumbSticks, const GamePadTriggers triggers, const GamePadButtons buttons, const GamePadDPad dPad);
|
|
|
|
GamePadState();
|
|
|
|
GamePadState(const GamePadState &obj);
|
|
|
|
|
2013-05-31 15:58:00 +02:00
|
|
|
bool Equals(Object const * const obj) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
bool Equals(const GamePadState obj) const;
|
|
|
|
int GetHashCode() const;
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
bool IsButtonDown(const Buttons_t button) const;
|
|
|
|
bool IsButtonUp(const Buttons_t button) const;
|
2013-07-11 20:00:07 +02:00
|
|
|
const String ToString() const;
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
bool operator==(const GamePadState& right) const;
|
|
|
|
bool operator!=(const GamePadState& right) const;
|
|
|
|
|
2013-06-02 14:32:43 +02:00
|
|
|
inline GamePadState operator =(const GamePadState& right)
|
2013-05-05 18:18:41 +02:00
|
|
|
{
|
|
|
|
return (*this == right) ? *this : GamePadState(right);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_INPUT_GAMEPADSTATE_
|