summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-12 22:42:42 +0100
committerIra Rice <irarice@gmail.com>2009-03-12 21:53:00 -0600
commitf0d5e3da15a308fcc962590330e7d8e39e8874b9 (patch)
treea0e7f61b1f6a2f2aee20549c9ac55a123ba3ccba /src/textparticle.cpp
parent5207b4cbb462cfa962a6f566897a6affd92eef94 (diff)
downloadmana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.gz
mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.bz2
mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.xz
mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.zip
Make use of the new available colors
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
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);
}