summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 22:23:58 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:06 +0300
commit2dfa705d9957a24eb2fe70382795f74325e372f2 (patch)
treecfaac337bbed9da4bf004c8f16dadf880db7d08b /src/gui/widgets/textbox.cpp
parent8714a174353529061c8c8d088d7246c4bd81000d (diff)
downloadmanaverse-2dfa705d9957a24eb2fe70382795f74325e372f2.tar.gz
manaverse-2dfa705d9957a24eb2fe70382795f74325e372f2.tar.bz2
manaverse-2dfa705d9957a24eb2fe70382795f74325e372f2.tar.xz
manaverse-2dfa705d9957a24eb2fe70382795f74325e372f2.zip
Add outlining support to textbox control.
Diffstat (limited to 'src/gui/widgets/textbox.cpp')
-rw-r--r--src/gui/widgets/textbox.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index e5e8b50e5..cba575605 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -356,6 +356,7 @@ void TextBox::draw(gcn::Graphics* graphics)
}
graphics->setColor(mForegroundColor);
+ static_cast<Graphics*>(graphics)->setColor2(mForegroundColor2);
gcn::Font *const font = getFont();
const int fontHeight = font->getHeight();
@@ -366,3 +367,16 @@ void TextBox::draw(gcn::Graphics* graphics)
}
BLOCK_END("TextBox::draw")
}
+
+void TextBox::setForegroundColor(const gcn::Color &color)
+{
+ mForegroundColor = color;
+ mForegroundColor2 = color;
+}
+
+void TextBox::setForegroundColorAll(const gcn::Color &color1,
+ const gcn::Color &color2)
+{
+ mForegroundColor = color1;
+ mForegroundColor2 = color2;
+}