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/Window.hpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/GFX/Window.hpp') diff --git a/src/GFX/Window.hpp b/src/GFX/Window.hpp index c26b0fd..86920b5 100644 --- a/src/GFX/Window.hpp +++ b/src/GFX/Window.hpp @@ -1,35 +1,31 @@ #pragma once -#include "../Common/Sizes.hpp" -#include "../Math/Vector.hpp" +#include #include -#include "Mouse.hpp" +#include "../Common/Pure.hpp" +#include "../Common/Sizes.hpp" namespace MC::GFX { class Window { public: - Window(const Char* title, U32 width, U32 height); + Window(std::string const& title, U32 width, U32 height); ~Window(); - GLFWwindow* get() const; + PURE GLFWwindow* get() const; - void on_size_change(void (* callback)(GLFWwindow*, I32, I32)); + void on_size_change(void (* callback)(GLFWwindow*, I32, I32)) const; void attach() const; void detach() const; - void close(); - void start_render(); - void poll_events(); - Vector<2> mouse_delta(); + void close() const; + void start_render() const; + void poll_events() const; - Bool key(I32 key, I32 type) const; - Bool mouse(I32 key, I32 type) const; - Bool should_close() const; + PURE Bool should_close() const; private: GLFWwindow* m_window; - Mouse m_mouse; }; -} \ No newline at end of file +} -- cgit 1.4.1