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 ed8609e9..792b6bea 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -21,21 +21,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)
{
}
@@ -64,6 +60,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);
}