aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/include/window.h
blob: 3c34d4c899ab258e1495bd56dcc5173e899218dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include <SDL2/SDL.h>
#include <vector>
#include "uiObject.h"
#include "uiRenderer.h"

class WindowManager {
public:
    WindowManager();
    virtual ~WindowManager();

    bool initWindow();
    void destroyWindow();
    SDL_Renderer* getRenderer();

    void addUIObject(UIObject* uiObject);
    void renderUIObjects();

private:
    const int SCREEN_WIDTH = 800;
    const int SCREEN_HEIGHT = 600;
    SDL_Window* window = nullptr;
    SDL_Renderer* renderer = nullptr;

    UIRenderer* uiRenderer;
    std::vector<UIObject*> uiObjects;
};