summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-27 15:58:18 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-27 23:15:05 +0300
commit697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce (patch)
treee5cbf0d91a689a598193c7b7a292e7c711c49fdc /src/text.cpp
parent60add2c149c9c61bfbede5ae92cfe216927aca8a (diff)
downloadplus-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.gz
plus-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.bz2
plus-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.tar.xz
plus-697e5bbf3171b0ba1fbbc0bbe61461c7726bf1ce.zip
Remove textrenderer class.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/text.cpp b/src/text.cpp
index cf15590fe..8c6b00fbe 100644
--- a/src/text.cpp
+++ b/src/text.cpp
@@ -25,10 +25,10 @@
#include "configuration.h"
#include "textmanager.h"
-#include "textrenderer.h"
#include "gui/gui.h"
#include "gui/sdlfont.h"
+#include "gui/theme.h"
#include "resources/resourcemanager.h"
#include "resources/image.h"
@@ -50,6 +50,7 @@ Text::Text(const std::string &text, const int x, const int y,
mHeight(mFont->getHeight()),
mText(text),
mColor(color),
+ mOutlineColor(Theme::getThemeColor(Theme::OUTLINE)),
mIsSpeech(isSpeech)
{
if (!textManager)
@@ -123,7 +124,7 @@ void Text::adviseXY(const int x, const int y)
textManager->moveText(this, x - mXOffset, y);
}
-void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff)
+void Text::draw(Graphics *const graphics, const int xOff, const int yOff)
{
BLOCK_START("Text::draw")
if (mIsSpeech)
@@ -133,9 +134,11 @@ void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff)
mBubble);
}
- TextRenderer::renderText(graphics, mText,
- mX - xOff, mY - yOff, gcn::Graphics::LEFT,
- *mColor, mFont, !mIsSpeech, true);
+ graphics->setColor(*mColor);
+ if (!mIsSpeech)
+ graphics->setColor2(mOutlineColor);
+
+ mFont->drawString(graphics, mText, mX - xOff, mY - yOff);
BLOCK_END("Text::draw")
}
@@ -147,8 +150,7 @@ FlashText::FlashText(const std::string &text, const int x, const int y,
{
}
-void FlashText::draw(gcn::Graphics *const graphics,
- const int xOff, const int yOff)
+void FlashText::draw(Graphics *const graphics, const int xOff, const int yOff)
{
BLOCK_START("FlashText::draw")
if (mTime)