Added Input

This commit is contained in:
sippeangelo
2015-11-24 10:37:50 +01:00
parent 0a1f0d96db
commit 5f9dce4303
22 changed files with 937 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
#ifndef Events_GamepadButton_h__
#define Events_GamepadButton_h__
#include "Core/EventBroker.h"
namespace Gamepad
{
/** Gamepad button type */
enum class Button
{
Up,
Down,
Left,
Right,
Start,
Back,
LeftThumb,
RightThumb,
LeftShoulder,
RightShoulder,
A,
B,
X,
Y,
LAST = Y
};
}
namespace Events
{
/** Thrown on gamepad button press. */
struct GamepadButtonDown : Event
{
/** ID of the gamepad. */
int GamepadID;
/** The button that was pressed. */
Gamepad::Button Button;
};
/** Thrown on gamepad button release. */
struct GamepadButtonUp : Event
{
/** ID of the gamepad. */
int GamepadID;
/** The button that was released. */
Gamepad::Button Button;
};
}
#endif