From 92f63bbdbfc214849c203511bbcb1be0a4865588 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 15 Feb 2024 11:33:11 +0100 Subject: Proper input system --- src/GFX/Mouse.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/GFX/Mouse.cpp (limited to 'src/GFX/Mouse.cpp') diff --git a/src/GFX/Mouse.cpp b/src/GFX/Mouse.cpp deleted file mode 100644 index 49f6972..0000000 --- a/src/GFX/Mouse.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "Mouse.hpp" - -namespace MC::GFX { - -Vector<2> Mouse::update(GLFWwindow* window) { - Real x, y; - glfwGetCursorPos(window, &x, &y); - - if (m_first_event) { - m_last_x = x; - m_last_y = y; - - m_first_event = false; - } - - Vector<2> movement{static_cast(x) - m_last_x, static_cast(y) - m_last_y}; - - m_last_x = x; - m_last_y = y; - - return movement; -} - -} \ No newline at end of file -- cgit 1.4.1