summaryrefslogtreecommitdiff
path: root/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'window.h')
-rw-r--r--window.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/window.h b/window.h
deleted file mode 100644
index bdd1e91..0000000
--- a/window.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#pragma once
-
-#include <functional>
-
-class Bitmap;
-
-struct SDL_Window;
-struct SDL_Renderer;
-struct SDL_Texture;
-
-class Window {
-public:
- Window(const char* title, int width, int height, int scale);
- ~Window();
-
- void update();
- void draw(Bitmap&);
-
- bool shouldClose() { return !m_isRunning; }
-
- void onMouseDown(std::function<void(int, int, int)> callback) { m_mouseDown = callback; }
- void onMouseUp(std::function<void(int, int, int)> callback) { m_mouseUp = callback; }
- void onMouseMove(std::function<void(int, int)> callback) { m_mouseMove = callback; }
-private:
- bool m_isRunning;
-
- int m_width, m_height, m_scale;
-
- SDL_Window* m_window;
- SDL_Renderer* m_renderer;
- SDL_Texture* m_texture;
-
- std::function<void(int, int, int)> m_mouseDown;
- std::function<void(int, int, int)> m_mouseUp;
- std::function<void(int, int)> m_mouseMove;
-}; \ No newline at end of file