diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 14:05:11 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 14:05:11 +0200 |
commit | 165c1ae6e4a4eea35d7ea2f2a6518ff36cf0112f (patch) | |
tree | 78ab1efe1154551581808814ff962154b053ae23 /View.h | |
parent | 1a30375e369d2d872cb3fd6ecdc6019136c7b1a4 (diff) |
separate view and museum thread
Diffstat (limited to 'View.h')
-rw-r--r-- | View.h | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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; |