added rest of basics in TSE_Core

This commit is contained in:
2026-01-17 21:06:02 +01:00
parent d09953f476
commit 117c1e6adb
27 changed files with 2908 additions and 9 deletions

View File

@@ -1,16 +1,16 @@
#include "InputGlfw.hpp"
void TSE::InputGlfw::Init()
void TSE::GLFW::InputGlfw::Init()
{
Instance = new InputGlfw();
}
void TSE::InputGlfw::Delete()
void TSE::GLFW::InputGlfw::Delete()
{
delete(Instance);
}
void TSE::InputGlfw::KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
void TSE::GLFW::InputGlfw::KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
{
switch (action)
{
@@ -35,7 +35,7 @@ void TSE::InputGlfw::KeyCallback(GLFWwindow *window, int key, int scancode, int
}
}
void TSE::InputGlfw::MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
void TSE::GLFW::InputGlfw::MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
{
switch (action)
{
@@ -60,7 +60,7 @@ void TSE::InputGlfw::MouseButtonCallback(GLFWwindow *window, int button, int act
}
}
void TSE::InputGlfw::CursorPosCallback(GLFWwindow *window, double xpos, double ypos)
void TSE::GLFW::InputGlfw::CursorPosCallback(GLFWwindow *window, double xpos, double ypos)
{
for(auto handler : ((InputGlfw*)instance())->cursorHandler)
{
@@ -68,7 +68,7 @@ void TSE::InputGlfw::CursorPosCallback(GLFWwindow *window, double xpos, double y
}
}
void TSE::InputGlfw::ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
void TSE::GLFW::InputGlfw::ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
{
for(auto handler : ((InputGlfw*)instance())->cursorHandler)
{
@@ -99,7 +99,7 @@ std::string UTF32ToUTF8(char32_t ch)
return result;
}
void TSE::InputGlfw::CharCallback(GLFWwindow *window, unsigned int codepoint)
void TSE::GLFW::InputGlfw::CharCallback(GLFWwindow *window, unsigned int codepoint)
{
char32_t c = static_cast<char32_t>(codepoint);
std::string msg = UTF32ToUTF8(c);

View File

@@ -3,7 +3,7 @@
#include "interfaces/IInputManager.hpp"
#include "GLFW/glfw3.h"
namespace TSE
namespace TSE::GLFW
{
class InputGlfw : public IInputManager
{