summaryrefslogtreecommitdiff
path: root/src/gui/textbox.h
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-12 22:42:42 +0100
committerJared Adams <jaxad0127@gmail.com>2009-03-12 19:38:55 -0600
commit3b1fbbe072e4da86be4c8f8f22655d04565379d2 (patch)
tree9bae46138230c01fd2998395e146556f9a9db05b /src/gui/textbox.h
parentb9191530c81595b0ad3d2faa6c4d21d75a720c29 (diff)
downloadmana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.gz
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.bz2
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.xz
mana-3b1fbbe072e4da86be4c8f8f22655d04565379d2.zip
Make use of the new available colors
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
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 10a81fc0..5884e11c 100644
--- a/src/gui/textbox.h
+++ b/src/gui/textbox.h
@@ -39,6 +39,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.
*/
@@ -49,8 +54,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