aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/include/uiRenderer.h
blob: 8f22fdf8be778c8a18cfa641d68802ad7037b3e8 (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 "uiObject.h"
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <string>

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);
};