0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 09:03:42 +00:00
SDL_Minigame/include/TextManager.h
ineslelin d4374ef46d created textmanager class
used to load fonts, will contain wrapper functions of sdl ttf functions
2025-01-23 17:00:06 +01:00

27 lines
524 B
C++

#ifndef CHICKENGAME_TEXTMANAGER_H
#define CHICKENGAME_TEXTMANAGER_H
#include <SDL3_ttf/SDL_ttf.h>
#include <map>
class TextManager
{
public:
TextManager() {}
~TextManager() {
for (auto& it : this->font_cache) {
TTF_CloseFont(it.second);
}
}
TextManager(TextManager const&) = delete;
void operator=(TextManager const&) = delete;
TTF_Font* loadFont(const char* filepath);
std::map<const char*, TTF_Font*> font_cache;
private:
};
#endif //CHICKENGAME_TEXTMANAGER_H