added input system
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "utils/Time.hpp"
|
||||
#include "TimeInterfaceGlfw.hpp"
|
||||
#include "Debug.hpp"
|
||||
#include "InputGlfw.hpp"
|
||||
|
||||
TSE::GLFW::WindowGlfw::WindowGlfw(string _title, int _width, int _height, IRenderingBackend* backend)
|
||||
: WindowGlfw(_title, _width, _height, backend, WindowType::Windowed, 32){ }
|
||||
@@ -38,6 +39,7 @@ bool TSE::GLFW::WindowGlfw::Init()
|
||||
return false;
|
||||
}
|
||||
|
||||
InputGlfw::Init();
|
||||
Time::Init(new TimeInterfaceGlfw());
|
||||
|
||||
renderingBackend->InitPreWindow();
|
||||
@@ -95,6 +97,11 @@ bool TSE::GLFW::WindowGlfw::Init()
|
||||
|
||||
//callbacks
|
||||
glfwSetWindowSizeCallback(window, ResizeWindow);
|
||||
glfwSetKeyCallback(window, InputGlfw::KeyCallback);
|
||||
glfwSetMouseButtonCallback(window, InputGlfw::MouseButtonCallback);
|
||||
glfwSetCursorPosCallback(window, InputGlfw::CursorPosCallback);
|
||||
glfwSetScrollCallback(window, InputGlfw::ScrollCallback);
|
||||
glfwSetCharCallback(window, InputGlfw::CharCallback);
|
||||
|
||||
Debug::Log("GLFW:" + std::string(glfwGetVersionString()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user