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
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2010-12-27 01:01:25 +00:00
|
|
|
|
/// Represents specific information about the state of an Xbox Controller, including the current state of buttons
|
2010-12-04 16:14:34 +00:00
|
|
|
|
/// and sticks.
|
|
|
|
|
/// </summary>
|
|
|
|
|
struct GamePadState
|
|
|
|
|
{
|
|
|
|
|
GamePadButtons Buttons;
|
|
|
|
|
GamePadDPad DPad;
|
|
|
|
|
bool IsConnected;
|
|
|
|
|
GamePadThumbSticks ThumbSticks;
|
|
|
|
|
GamePadTriggers Triggers;
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
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();
|
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
bool IsButtonDown(Buttons_t button);
|
|
|
|
|
bool IsButtonUp(Buttons_t button);
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
bool operator==(const GamePadState other);
|
|
|
|
|
bool operator!=(const GamePadState other);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-27 01:01:25 +00:00
|
|
|
|
#endif //_XFX_INPUT_GAMEPADSTATE_
|