summaryrefslogtreecommitdiff
path: root/src/gui/textbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/textbox.h')
-rw-r--r--src/gui/textbox.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/textbox.h b/src/gui/textbox.h
index 33ea42f9..20f4ebe2 100644
--- a/src/gui/textbox.h
+++ b/src/gui/textbox.h
@@ -40,6 +40,11 @@ class TextBox : public gcn::TextBox
*/
TextBox();
+ inline void setTextColor(const gcn::Color* color)
+ {
+ mTextColor = color;
+ }
+
/**
* Sets the text after wrapping it to the current width of the widget.
*/
@@ -50,8 +55,18 @@ class TextBox : public gcn::TextBox
*/
int getMinWidth() { return mMinWidth; }
+ /**
+ * Draws the text.
+ */
+ inline void draw(gcn::Graphics *graphics)
+ {
+ setForegroundColor(*mTextColor);
+ gcn::TextBox::draw(graphics);
+ }
+
private:
int mMinWidth;
+ const gcn::Color* mTextColor;
};
#endif