summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r--src/textparticle.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index f38c32ce..04b7abe1 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -21,18 +21,18 @@
#include <guichan/color.hpp>
-#include "graphics.h"
#include "textparticle.h"
+#include "gui/textrenderer.h"
+
TextParticle::TextParticle(Map *map, const std::string &text,
- int colorR, int colorG, int colorB,
- gcn::Font *font):
+ const gcn::Color* color,
+ gcn::Font *font, bool outline):
Particle(map),
mText(text),
mTextFont(font),
- mColorR(colorR),
- mColorG(colorG),
- mColorB(colorB)
+ mColor(color),
+ mOutline(outline)
{
}
@@ -58,7 +58,7 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
alpha /= mFadeIn;
}
- graphics->setFont(mTextFont);
- graphics->setColor(gcn::Color(mColorR, mColorG, mColorB, (int)alpha));
- graphics->drawText(mText, screenX, screenY, gcn::Graphics::CENTER);
+ TextRenderer::renderText(graphics, mText,
+ screenX, screenY, gcn::Graphics::CENTER,
+ *mColor, mTextFont, mOutline, false, (int) alpha);
}