19 lines
468 B
C++
19 lines
468 B
C++
#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;
|
|
};
|