#include <GUIText.hpp>
Public Member Functions | |
GUIText (GUIManager *pManager) | |
Constructor. | |
GUIText (GUIManager *pManager, const std::string &name) | |
Constructor. | |
virtual | ~GUIText () |
Destructor. | |
bool | load (Core::XMLNode *pNode) |
Load the widget. | |
void | render (std::vector< GUIManager::Quad > &renderList) |
Render the widget. | |
void | setFontName (const std::string &name) |
Set font name. | |
const std::string & | getFontName () const |
Get font name. | |
void | setFontSize (const float size) |
Set font size. | |
const float | getFontSize () const |
Get font size. | |
void | setText (const std::string &text) |
Set text. | |
const std::string & | getText () const |
Get text. | |
Private Attributes | |
GUIFont * | m_pFont |
Font. | |
std::string | m_fontName |
Font name. | |
float | m_fontSize |
Font size. | |
std::string | m_text |
Text. |
It is a simple widget which displays some text.
syBR::Game::GUIText::GUIText | ( | GUIManager * | pManager | ) |
Constructor.
pManager | GUI manager using this widget |
syBR::Game::GUIText::GUIText | ( | GUIManager * | pManager, | |
const std::string & | name | |||
) |
Constructor.
pManager | GUI manager using this widget | |
name | Name of the widget |
syBR::Game::GUIText::~GUIText | ( | ) | [virtual] |
Destructor.
Release used resources.
bool syBR::Game::GUIText::load | ( | Core::XMLNode * | pNode | ) | [virtual] |
void syBR::Game::GUIText::render | ( | std::vector< GUIManager::Quad > & | renderList | ) | [virtual] |
Render the widget.
Render the widget and its subcomponents.
renderList | List of renderables where all the renderables of this widget and its subcomponents will be pushed back |
Reimplemented from syBR::Game::GUIWidget.
void syBR::Game::GUIText::setFontName | ( | const std::string & | name | ) |
Set font name.
name | Name of the font to be used when rendering the widget |
const std::string & syBR::Game::GUIText::getFontName | ( | ) | const |
Get font name.
void syBR::Game::GUIText::setFontSize | ( | const float | size | ) |
Set font size.
size | Size of the font to be used when rendering the widget |
const float syBR::Game::GUIText::getFontSize | ( | ) | const |
Get font size.
void syBR::Game::GUIText::setText | ( | const std::string & | text | ) |
Set text.
text | Text to be rendered by the widget |
const std::string & syBR::Game::GUIText::getText | ( | ) | const |
Get text.
GUIFont* syBR::Game::GUIText::m_pFont [private] |
Font.
std::string syBR::Game::GUIText::m_fontName [private] |
Font name.
float syBR::Game::GUIText::m_fontSize [private] |
Font size.
std::string syBR::Game::GUIText::m_text [private] |
Text.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:33 2008