2022-05-28 16:49:08 +00:00
|
|
|
#pragma once
|
2022-06-19 18:01:31 +00:00
|
|
|
#include <list>
|
|
|
|
|
2022-05-28 16:49:08 +00:00
|
|
|
#include "Graphics/Window.h"
|
2022-06-10 20:44:40 +00:00
|
|
|
#include "EventSystem/EventEmitter.h"
|
2022-06-19 18:01:31 +00:00
|
|
|
#include "../Include/Input/GLFWInput.h"
|
|
|
|
#include "BarinkEngine.h"
|
2022-05-28 16:49:08 +00:00
|
|
|
|
|
|
|
namespace BarinkEngine {
|
|
|
|
|
2022-06-19 18:01:31 +00:00
|
|
|
class InputManager : public EventEmitter {
|
2022-05-28 16:49:08 +00:00
|
|
|
public:
|
|
|
|
InputManager();
|
|
|
|
|
|
|
|
void PollEvents();
|
2022-06-19 18:01:31 +00:00
|
|
|
|
2022-05-28 16:49:08 +00:00
|
|
|
void attach(BarinkWindow* window);
|
2022-06-19 18:01:31 +00:00
|
|
|
void detach(BarinkWindow* window);
|
|
|
|
|
2022-05-28 16:49:08 +00:00
|
|
|
|
2022-06-19 18:01:31 +00:00
|
|
|
void setupGLFWInput(GLFWwindow* window);
|
2022-06-10 19:06:45 +00:00
|
|
|
|
2022-06-10 20:44:40 +00:00
|
|
|
|
2022-06-19 18:01:31 +00:00
|
|
|
|
2022-05-28 16:49:08 +00:00
|
|
|
private:
|
2022-06-19 18:01:31 +00:00
|
|
|
std::list<BarinkWindow*> windows;
|
2022-06-10 20:44:40 +00:00
|
|
|
|
2022-05-28 16:49:08 +00:00
|
|
|
};
|
|
|
|
}
|