Added KeyboardChar event for keyboard text input

This commit is contained in:
2015-12-12 18:07:53 +01:00
parent 6723e71fee
commit 653b4689b5
3 changed files with 37 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_KeyboardChar_h__
#define Events_KeyboardChar_h__
#include "EventBroker.h"
namespace Events
{
struct KeyboardChar : Event
{
double Timestamp = 0.f;
unsigned int Char = 0;
};
}
#endif
+4
View File
@@ -8,6 +8,7 @@
#include "EventBroker.h"
#include "EKeyDown.h"
#include "EKeyUp.h"
#include "EKeyboardChar.h"
#include "EMousePress.h"
#include "EMouseRelease.h"
#include "EMouseMove.h"
@@ -64,6 +65,9 @@ private:
void PublishGamepadAxisIfChanged(int gamepadID, Gamepad::Axis axis);
void PublishGamepadButtonIfChanged(int gamepadID, Gamepad::Button button);
static std::vector<unsigned int> CharCallbackQueue;
static void GLFWCharCallback(GLFWwindow* window, unsigned int c);
};
#endif