aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/include/uiRenderer.h
blob: 32acecfb3dc2bd0333dd05e714115ba16099661d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <string>
#include "uiObject.h"

class UIRenderer {
public:
    UIRenderer(SDL_Renderer* renderer);
    ~UIRenderer();

    void render(UIObject* uiObject);

private:
    SDL_Renderer* renderer;
    TTF_Font* font;

    void renderButton(Button* button);
    void renderText(Text* text);
    void renderTextInput(TextInput* textInput);
};