19 lines
383 B
C++
19 lines
383 B
C++
#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(std::string font, int size, SDL_Color color);
|
|
~Text();
|
|
void update(std::string text, SDL_Renderer* renderer);
|
|
void draw(SDL_Renderer* renderer, int x, int y);
|
|
}; |