added input system

This commit is contained in:
2026-01-17 18:01:48 +01:00
parent 6d90c91209
commit cf5602417b
21 changed files with 120171 additions and 0 deletions

View File

@@ -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()));