YoggieEngine/BarinkEngine/Include/Input/InputManager.h

28 lines
734 B
C++

#pragma once
#include <vector>
#include "Graphics/Window.h"
#include "EventSystem/EventEmitter.h"
namespace BarinkEngine {
class InputManager : EventEmitter {
public:
InputManager();
void PollEvents();
void attach(BarinkWindow* window);
// GLFW Handlers
static void KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
static void CursorPositionCallback(GLFWwindow* window, double x, double y);
static void CursorEnterCallback(GLFWwindow* window, int entered);
static void MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
static void ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
private:
std::vector<BarinkWindow*> windows;
};
}