feat added working text renderer

This commit is contained in:
2025-07-14 23:44:36 +02:00
parent edc2372c96
commit 2375337bf2
70 changed files with 10533 additions and 262 deletions

View File

@ -0,0 +1,18 @@
#pragma once
#include "FontManager.hpp"
#include <SDL3/SDL.h>
#include <string>
/*
By Utilizing the existing Renderer this class creates and renders text to the screen
*/
class TextRenderer {
public:
TextRenderer(SDL_Renderer* renderer, FontManager* fontMgr);
SDL_Texture* RenderText(const std::string& fontID, const std::string& text, int fontSize, SDL_Color color, int& outWidth, int& outHeight);
private:
SDL_Renderer* renderer;
FontManager* fontManager;
};