#include <TextEdit.h>
Inheritance diagram for pge::gui::TextEdit:
Public Member Functions | |
TextEdit (int x, int y, int width, int height) | |
Constructor. | |
virtual | ~TextEdit (void) |
Destructor. | |
bool | init (void) |
void | render (void) |
Called when the object should render itself. | |
void | timer (unsigned int delay) |
Called when the timer event comes. | |
void | setText (const std::string &text) |
std::string | getText (void) |
int | getTextSize (void) |
void | setTextSize (int size) |
Vector3f | getTextColor (void) |
void | setTextColor (const Vector3f &color) |
void | setBackgroundEnabled (bool background) |
Private Attributes | |
std::string | m_text |
Vector3f | m_textColor |
int | m_textSize |
bool | m_backgroundEnabled |
|
Constructor.
Definition at line 17 of file TextEdit.cpp. References m_backgroundEnabled, m_text, m_textColor, and m_textSize.
00017 : Component(x, y, width, height) { 00018 m_text = std::string(""); 00019 m_textColor = Vector3f(1.0f, 1.0f, 1.0f); 00020 m_textSize = 15; 00021 m_backgroundEnabled = false; 00022 } |
|
Destructor.
Definition at line 30 of file TextEdit.cpp.
00030 { 00031 } |
|
Definition at line 52 of file TextEdit.h. References m_text. Referenced by pge::gui::Console::keyTypeCall().
00052 { 00053 return m_text; 00054 } |
|
Definition at line 64 of file TextEdit.h. References m_textColor.
00064 { 00065 return m_textColor; 00066 } |
|
Definition at line 56 of file TextEdit.h. References m_textSize.
00056 { 00057 return m_textSize; 00058 } |
|
Implements pge::IRenderableObject. Definition at line 39 of file TextEdit.cpp.
00039 { 00040 return true; 00041 } |
|
Called when the object should render itself.
Reimplemented from pge::gui::Component. Definition at line 49 of file TextEdit.cpp. References pge::gui::Component::getPosition(), m_backgroundEnabled, m_text, and m_textSize. Referenced by pge::gui::SceneAnalyseGUI::render(), and pge::gui::Console::render().
00049 { 00050 if(m_backgroundEnabled) { 00051 // Render background by super class 00052 Component::render(); 00053 } 00054 00055 // Render text. 00056 FontRenderer::getInstance()->renderString(m_text, m_textSize, getPosition().m_v[0], getPosition().m_v[1]); 00057 } |
Here is the call graph for this function:
|
Definition at line 72 of file TextEdit.h. References m_backgroundEnabled. Referenced by pge::gui::Console::Console(), and pge::gui::SceneAnalyseGUI::SceneAnalyseGUI().
00072 { 00073 m_backgroundEnabled = background; 00074 } |
|
Definition at line 48 of file TextEdit.h. References m_text. Referenced by pge::gui::Console::keyTypeCall(), pge::gui::SceneAnalyseGUI::render(), and pge::gui::SceneAnalyseGUI::SceneAnalyseGUI().
00048 { 00049 m_text = text; 00050 } |
|
Definition at line 68 of file TextEdit.h. References m_textColor.
00068 { 00069 m_textColor = color; 00070 } |
|
Definition at line 60 of file TextEdit.h. References m_textSize.
00060 { 00061 m_textSize = size; 00062 } |
|
Called when the timer event comes.
Implements pge::IRenderableObject. Definition at line 65 of file TextEdit.cpp.
00065 { 00066 } |
|
Definition at line 86 of file TextEdit.h. Referenced by render(), setBackgroundEnabled(), and TextEdit(). |
|
Definition at line 83 of file TextEdit.h. Referenced by getText(), render(), setText(), and TextEdit(). |
|
Definition at line 84 of file TextEdit.h. Referenced by getTextColor(), setTextColor(), and TextEdit(). |
|
Definition at line 85 of file TextEdit.h. Referenced by getTextSize(), render(), setTextSize(), and TextEdit(). |