summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r--src/textparticle.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index a065eadd..865c6764 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -22,21 +22,17 @@
#include <guichan/color.hpp>
-#include <SDL/SDL_ttf.h>
-
#include "textparticle.h"
#include "gui/textrenderer.h"
TextParticle::TextParticle(Map *map, const std::string &text,
- int colorR, int colorG, int colorB,
+ 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)
{
}
@@ -65,6 +61,5 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
TextRenderer::renderText(graphics, mText,
screenX, screenY, gcn::Graphics::CENTER,
- &gcn::Color(mColorR, mColorG, mColorB), mTextFont, mOutline, false,
- (int) alpha);
+ mColor, mTextFont, mOutline, false, (int) alpha);
}