bootleg-game-engine/include/text.h

18 lines
317 B
C
Raw Normal View History

2024-09-06 09:34:29 +00:00
#include <SDL.h>
#include <SDL_ttf.h>
#include <string>
class Text
{
private:
SDL_Surface* surface;
SDL_Texture* texture;
TTF_Font* font;
SDL_Color color;
SDL_Rect rect;
public:
Text(TTF_Font* font, SDL_Color color);
void draw(SDL_Renderer* renderer, std::string text, int x, int y);
};