mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Added some new Type infos Removed excess whitespace Added some new files Implemented missing methods
54 lines
1.6 KiB
C++
54 lines
1.6 KiB
C++
/*****************************************************************************
|
|
* GamePadState.h *
|
|
* *
|
|
* XFX::Input::GamePadState structure definition file *
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
*****************************************************************************/
|
|
#ifndef _XFX_INPUT_GAMEPADSTATE_
|
|
#define _XFX_INPUT_GAMEPADSTATE_
|
|
|
|
#include "GamePadButtons.h"
|
|
#include "GamePadDPad.h"
|
|
#include "GamePadThumbSticks.h"
|
|
#include "GamePadTriggers.h"
|
|
|
|
namespace XFX
|
|
{
|
|
namespace Input
|
|
{
|
|
/**
|
|
* Represents specific information about the state of an Xbox Controller, including the current state of buttons and sticks.
|
|
*/
|
|
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);
|
|
|
|
bool Equals(Object const * const obj) const;
|
|
bool Equals(const GamePadState obj) const;
|
|
int GetHashCode() const;
|
|
static const Type& GetType();
|
|
bool IsButtonDown(const Buttons_t button) const;
|
|
bool IsButtonUp(const Buttons_t button) const;
|
|
const String ToString() const;
|
|
|
|
bool operator==(const GamePadState& right) const;
|
|
bool operator!=(const GamePadState& right) const;
|
|
|
|
inline GamePadState operator =(const GamePadState& right)
|
|
{
|
|
return (*this == right) ? *this : GamePadState(right);
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //_XFX_INPUT_GAMEPADSTATE_
|