treewars/label.cpp

17 lines
349 B
C++

#include "label.h"
#include "drawutils.h"
Label::Label(string text, int x, int y, TTF_Font* font, int colour)
{
this->text = text;
this->font = font;
this->colour = colour;
this->x = x;
this->y = y;
}
void Label::render(SDL_Surface* display)
{
if (text != "") DrawUtils::draw_text(display, text, x, y, font, colour);
}