#include "cTextButton.hpp"

using GUIEngine::cTextButton;

/*static*/ const cString cTextButton::sNAME = "textButton";

cTextButton::cTextButton(cWindow* parent, const signed int id, const cString& text, const GUIHelpers::eAlign& align /*= GUIHelpers::eAlign::CENTER*/,
	const GUIHelpers::eLayout& layout /*= GUIHelpers::eLayout::FILL_PARENT*/, const GUIHelpers::Position& pos /*= POSITION*/,
	const GUIHelpers::Size& size /*= SIZE*/, const GUIHelpers::Padding& padding /*= PADDING*/, const cString& name /*= NAME*/)
	: m_label(this, -1, text)
{
	Create(parent, id, text, align, layout, pos, size, padding, name);
}

/*virtual*/ cTextButton::~cTextButton()
{}

///Functions
void cTextButton::Create(cWindow* parent, const signed int id, const cString& text, const GUIHelpers::eAlign& align /*= GUIHelpers::eAlign::CENTER*/,
	const GUIHelpers::eLayout& layout /*= GUIHelpers::eLayout::FILL_PARENT*/, const GUIHelpers::Position& pos /*= POSITION*/,
	const GUIHelpers::Size& size /*= SIZE*/, const GUIHelpers::Padding& padding /*= PADDING*/, const cString& name /*= NAME*/)
{
	cButton::Create(parent, id, align, layout, pos, size, padding, name);
	setText(text);
}

//Sets
void cTextButton::setText(const cString& text)
{
	m_label.setText(text);
}

void cTextButton::setTextColour(const GUIHelpers::RGBA& colour)
{
	m_label.setFontColour(colour);
}

void cTextButton::setTextSize(const unsigned long int size)
{
	m_label.setSize(size);
}

///Gets
const cString cTextButton::getText() const
{
	return m_label.getText();
}

const GUIHelpers::RGBA cTextButton::getTextColour()
{
	return m_label.getFontColour();
}

const unsigned long int cTextButton::getTextSize()
{
	return m_label.getFontSize();
}

/*virtual*/ const GUIHelpers::eType cTextButton::getType() const
{
	return GUIHelpers::eType::CTEXTBUTTON;
}

void CreateLabel()
{}

void GenerateImage()
{}

void GenerateTexture()
{}