#include <tgLabel.h>
Public Member Functions | |
| void | AddText (const char *text, unsigned size=20) |
| adds text to the label, should not be called at framerate, since it creates a texture on the GPU | |
| const char * | c_str () |
| void | Clear () |
| clears the text of the label and destroys texture for it on the GPU | |
| void | CreateLabel () |
| void | Draw () const |
| draws the label at frame rate, should be called after everything else is rendered, since depth-testing is disabled | |
| void | SetFont (const char *ttf_filename) |
| void | SetPose (tgPose pose) |
| tgLabel () | |
| Constructor of tgLabel. | |
| tgLabel (const char *ttf_filename) | |
| ~tgLabel () | |
Private Attributes | |
| tgFont * | m_font |
| std::string | m_fontfilename |
| float | m_height |
| unsigned | m_maxStrLen |
| tgPose | m_pose |
| std::vector< std::string > | m_text |
| tgTexture * | m_texture |
| unsigned | m_txtHeight |
| unsigned | m_txtSize |
| float | m_width |
| tgLabel::tgLabel | ( | ) |
Constructor of tgLabel.
| w | width of label in pixels |
| h | height of label in pixels |
| ttf_filename | file name of true type font (ttf) to use for text |
Definition at line 9 of file tgLabel.cpp.
| tgLabel::tgLabel | ( | const char * | ttf_filename | ) |
Definition at line 16 of file tgLabel.cpp.
Definition at line 24 of file tgLabel.cpp.
| void tgLabel::AddText | ( | const char * | text, |
| unsigned | size = 20 |
||
| ) |
adds text to the label, should not be called at framerate, since it creates a texture on the GPU
Definition at line 34 of file tgLabel.cpp.
| const char* TomGine::tgLabel::c_str | ( | ) | [inline] |
| void tgLabel::Clear | ( | ) |
clears the text of the label and destroys texture for it on the GPU
Definition at line 83 of file tgLabel.cpp.
| void tgLabel::CreateLabel | ( | ) |
Definition at line 44 of file tgLabel.cpp.
| void tgLabel::Draw | ( | ) | const |
draws the label at frame rate, should be called after everything else is rendered, since depth-testing is disabled
Definition at line 94 of file tgLabel.cpp.
| void TomGine::tgLabel::SetFont | ( | const char * | ttf_filename | ) | [inline] |
| void TomGine::tgLabel::SetPose | ( | tgPose | pose | ) | [inline] |
tgFont* TomGine::tgLabel::m_font [private] |
std::string TomGine::tgLabel::m_fontfilename [private] |
float TomGine::tgLabel::m_height [private] |
unsigned TomGine::tgLabel::m_maxStrLen [private] |
tgPose TomGine::tgLabel::m_pose [private] |
std::vector<std::string> TomGine::tgLabel::m_text [private] |
tgTexture* TomGine::tgLabel::m_texture [private] |
unsigned TomGine::tgLabel::m_txtHeight [private] |
unsigned TomGine::tgLabel::m_txtSize [private] |
float TomGine::tgLabel::m_width [private] |