Basic input binding and command publishing system

This commit is contained in:
2014-05-05 09:17:58 +02:00
parent 5e7537b903
commit 0e068be77b
10 changed files with 233 additions and 11 deletions
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_BindKey_h__
#define Events_BindKey_h__
#include "EventBroker.h"
namespace Events
{
struct BindKey : Event
{
int KeyCode;
std::string Command;
};
}
#endif // Events_BindKey_h__
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_BindMouseButton_h__
#define Events_BindMouseButton_h__
#include "EventBroker.h"
namespace Events
{
struct BindMouseButton : Event
{
int Button;
std::string Command;
};
}
#endif // Events_BindMouseButton_h__
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_InputCommand_h__
#define Events_InputCommand_h__
#include "EventBroker.h"
namespace Events
{
struct InputCommand : Event
{
unsigned int PlayerID;
std::string Command;
};
}
#endif // Events_InputCommand_h__
+18
View File
@@ -0,0 +1,18 @@
#ifndef Events_InputCommandValue_h__
#define Events_InputCommandValue_h__
#include "EventBroker.h"
#include "Events/InputCommand.h"
namespace Events
{
template <typename T>
struct InputCommandValue : public InputCommand
{
T Value;
};
}
#endif // Events_InputCommandValue_h__