diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-27 15:58:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:15:05 +0300 |
commit | 697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce (patch) | |
tree | e5cbf0d91a689a598193c7b7a292e7c711c49fdc /src/gui/widgets/textpreview.cpp | |
parent | 60add2c149c9c61bfbede5ae92cfe216927aca8a (diff) | |
download | manaverse-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.gz manaverse-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.bz2 manaverse-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.xz manaverse-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.zip |
Remove textrenderer class.
Diffstat (limited to 'src/gui/widgets/textpreview.cpp')
-rw-r--r-- | src/gui/widgets/textpreview.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp index 8468da782..00ce7f42a 100644 --- a/src/gui/widgets/textpreview.cpp +++ b/src/gui/widgets/textpreview.cpp @@ -24,7 +24,6 @@ #include "client.h" #include "configuration.h" -#include "textrenderer.h" #include "gui/gui.h" #include "gui/sdlfont.h" @@ -110,9 +109,16 @@ void TextPreview::draw(gcn::Graphics* graphics) } } - TextRenderer::renderText(graphics, mText, mPadding + 1, mPadding + 1, - gcn::Graphics::LEFT, gcn::Color(mTextColor->r, mTextColor->g, - mTextColor->b, alpha), mFont, mOutline, mShadow); + graphics->setColor(gcn::Color(mTextColor->r, mTextColor->g, + mTextColor->b, alpha)); + + if (mOutline) + { + Graphics *const g = static_cast<Graphics *const>(graphics); + g->setColor2(Theme::getThemeColor(Theme::OUTLINE)); + } + + mFont->drawString(graphics, mText, mPadding + 1, mPadding + 1); BLOCK_END("TextPreview::draw") } |