#include <GUIFont.hpp>
Public Member Functions | |
GUIFont (const std::string &name, Core::Logger *pLogger) | |
Constructor. | |
virtual | ~GUIFont () |
Destructor. | |
bool | load () |
Load font descriptor and the associated texture. | |
void | render (const std::string &text, const Ogre::Vector2 &position, float size, const Ogre::ColourValue &color, std::vector< GUIManager::Quad > &renderList) |
Render some text. | |
Private Attributes | |
Core::Logger * | m_pLogger |
Pointer to the logger to be used. | |
bool | m_loaded |
Indicates if the font is already loaded. | |
std::string | m_name |
Name. | |
std::string | m_textureName |
Texture name. | |
FontDescriptor | m_descriptor |
Font descriptor. | |
CharacterDescriptor | m_characters [CHARACTER_COUNT] |
Characters descriptors. | |
Classes | |
struct | CharacterDescriptor |
Structure used internally to describe a font character. More... | |
struct | FontDescriptor |
Structure used internally to describle a font. More... |
It loads a bitmap font descriptor from Bitmap Font Generator (visit www.AngelCode.com) and allows to retrieve rendering informations for each character in the font.
syBR::Game::GUIFont::GUIFont | ( | const std::string & | name, | |
Core::Logger * | pLogger | |||
) |
Constructor.
name | Name of the widget | |
pLogger | Pointer to the instance of the logger to use |
syBR::Game::GUIFont::~GUIFont | ( | ) | [virtual] |
Destructor.
Release used resources.
bool syBR::Game::GUIFont::load | ( | ) |
Load font descriptor and the associated texture.
void syBR::Game::GUIFont::render | ( | const std::string & | text, | |
const Ogre::Vector2 & | position, | |||
float | size, | |||
const Ogre::ColourValue & | color, | |||
std::vector< GUIManager::Quad > & | renderList | |||
) |
Render some text.
text | Text to render | |
position | Top left position of the text in Ogre coordinates | |
size | Size factor (1.0 to use normal size) | |
color | Color of the text | |
renderList | List of renderables where all the renderables needed to render the requested text will be pushed back |
Core::Logger* syBR::Game::GUIFont::m_pLogger [private] |
Pointer to the logger to be used.
bool syBR::Game::GUIFont::m_loaded [private] |
Indicates if the font is already loaded.
std::string syBR::Game::GUIFont::m_name [private] |
Name.
std::string syBR::Game::GUIFont::m_textureName [private] |
Texture name.
Font descriptor.
CharacterDescriptor syBR::Game::GUIFont::m_characters[CHARACTER_COUNT] [private] |
Characters descriptors.
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