// Author: Juan Carlos De Abreu (jcabreur@gmail.com)

#include "text.h"
#include "window_management.h"
#include "../Includes/OpenGL.h"

BEGIN_TEG_NAMESPACE();
BEGIN_NAMESPACE(gui);

Text::Text(int x, int y, const std::tstring& caption)
    : Control(x, y, 1, 1), caption_(caption) {}

Text::~Text() {}

void Text::Render() const {
  // If the text is visible display it.
  if(is_visible_) GL_WRITE(x_, y_ + 16, caption_.c_str());
}

END_NAMESPACE(gui);
END_TEG_NAMESPACE();
