aboutsummaryrefslogtreecommitdiff
path: root/View.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-13 14:05:11 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-13 14:05:11 +0200
commit165c1ae6e4a4eea35d7ea2f2a6518ff36cf0112f (patch)
tree78ab1efe1154551581808814ff962154b053ae23 /View.h
parent1a30375e369d2d872cb3fd6ecdc6019136c7b1a4 (diff)
separate view and museum thread
Diffstat (limited to 'View.h')
-rw-r--r--View.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/View.h b/View.h
index e26c56c..58dc33d 100644
--- a/View.h
+++ b/View.h
@@ -1,25 +1,35 @@
#pragma once
-#include "Color.h"
-#include "Rectangle.h"
#include <SDL2/SDL.h>
#include <thread>
+#include "Color.h"
+#include "Rectangle.h"
+
+class ViewController;
+
class View {
public:
- View();
+ View(ViewController & vc);
virtual ~View();
public:
virtual void set_size(unsigned int width, unsigned int height);
- virtual void draw_begin();
virtual void draw_rect(Rectangle r, Color c);
+
+private:
+ virtual void draw_begin();
virtual void draw_end();
+ virtual void window_init();
+ virtual void window_deinit();
public:
bool open = true;
private:
+ ViewController & controller;
+
+private:
unsigned int width = 0, height = 0;
SDL_Window * window = nullptr;
SDL_Renderer * renderer = nullptr;