Merge branch 'master' into gui

Conflicts:
	src/GUI/Frame.h
	src/InputManager.cpp
This commit is contained in:
2014-05-15 21:16:43 +02:00
84 changed files with 3645 additions and 1121 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef Events_BindGamepadAxis_h__
#define Events_BindGamepadAxis_h__
#include <boost/any.hpp>
#include "EventBroker.h"
#include "Events/GamepadAxis.h"
namespace Events
{
struct BindGamepadAxis : Event
{
Gamepad::Axis Axis;
std::string Command;
float Value;
};
}
#endif // Events_BindGamepadAxis_h__
+21
View File
@@ -0,0 +1,21 @@
#ifndef Events_BindGamepadButton_h__
#define Events_BindGamepadButton_h__
#include <boost/any.hpp>
#include "EventBroker.h"
#include "Events/GamepadButton.h"
namespace Events
{
struct BindGamepadButton : Event
{
Gamepad::Button Button;
std::string Command;
float Value;
};
}
#endif // Events_BindGamepadButton_h__
+3
View File
@@ -1,6 +1,8 @@
#ifndef Events_BindKey_h__
#define Events_BindKey_h__
#include <boost/any.hpp>
#include "EventBroker.h"
namespace Events
@@ -10,6 +12,7 @@ struct BindKey : Event
{
int KeyCode;
std::string Command;
float Value;
};
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef Events_GamepadAxis_h__
#define Events_GamepadAxis_h__
#include "EventBroker.h"
namespace Gamepad
{
enum class Axis
{
LeftX,
LeftY,
RightX,
RightY,
LeftTrigger,
RightTrigger,
LAST = RightTrigger
};
}
namespace Events
{
struct GamepadAxis : Event
{
int GamepadID;
Gamepad::Axis Axis;
float Value;
};
}
#endif // Events_GamepadAxis_h__
+45
View File
@@ -0,0 +1,45 @@
#ifndef Events_GamepadButton_h__
#define Events_GamepadButton_h__
#include "EventBroker.h"
namespace Gamepad
{
enum class Button
{
Up,
Down,
Left,
Right,
Start,
Back,
LeftThumb,
RightThumb,
LeftShoulder,
RightShoulder,
A,
B,
X,
Y,
LAST = Y
};
}
namespace Events
{
struct GamepadButtonDown : Event
{
int GamepadID;
Gamepad::Button Button;
};
struct GamepadButtonUp : Event
{
int GamepadID;
Gamepad::Button Button;
};
}
#endif // Events_GamepadButton_h__
+1 -1
View File
@@ -12,7 +12,7 @@ struct InputCommand : Event
{
unsigned int PlayerID;
std::string Command;
boost::any Value;
float Value;
};
}
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_SetVelocity_h__
#define Events_SetVelocity_h__
#include "Entity.h"
#include "EventBroker.h"
namespace Events
{
struct SetVelocity : Event
{
EntityID Entity;
glm::vec3 Velocity;
};
}
#endif // Events_SetVelocity_h__
+19
View File
@@ -0,0 +1,19 @@
#ifndef Events_TankSteer_h__
#define Events_TankSteer_h__
#include "Entity.h"
#include "EventBroker.h"
namespace Events
{
struct TankSteer : Event
{
EntityID Entity;
float PositionX;
float PositionY;
bool Handbrake;
};
}
#endif // Events_TankSteer_h__