YoggieEngine/BarinkEngine/Include/Input/InputManager.h

28 lines
734 B
C
Raw Permalink Normal View History

#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);
2022-06-10 19:06:45 +00:00
2022-06-10 19:06:45 +00:00
// 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;
};
}