summary refs log tree commit diff
path: root/src/GFX/Window.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-02-15 11:33:11 +0100
committerMel <einebeere@gmail.com>2024-02-15 11:34:28 +0100
commit92f63bbdbfc214849c203511bbcb1be0a4865588 (patch)
treed82e1b31e583b5cc9538f61cad696dab5dbd84dc /src/GFX/Window.hpp
parent87ef308220addbe4406006ceb802a7364e6f1a05 (diff)
downloadmeowcraft-92f63bbdbfc214849c203511bbcb1be0a4865588.tar.zst
meowcraft-92f63bbdbfc214849c203511bbcb1be0a4865588.zip
Proper input system
Diffstat (limited to 'src/GFX/Window.hpp')
-rw-r--r--src/GFX/Window.hpp26
1 files changed, 11 insertions, 15 deletions
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 <string>
 #include <GLFW/glfw3.h>
-#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
+}