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
+1 -7
View File
@@ -1,12 +1,6 @@
#include "PrecompiledHeader.h"
#include "InputManager.h"
InputManager::InputManager(GLFWwindow* window, std::shared_ptr<EventBroker> eventBroker) : m_GLFWWindow(window)
, m_EventBroker(eventBroker)
{
}
void InputManager::Update(double dt)
{
m_LastKeyState = m_CurrentKeyState;
@@ -43,7 +37,7 @@ void InputManager::Update(double dt)
if (m_CurrentMouseState[i] != m_LastMouseState[i])
{
// Publish mouse button events
if (m_CurrentKeyState[i])
if (m_CurrentMouseState[i])
{
Events::MousePress e;
e.Button = i;