summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-05-23 21:45:43 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-05-23 21:45:43 +0000
commit993c98c3813b2ad7caf3dcd9761b4c9a17de39b6 (patch)
tree08cad1b1c2e129f17da0e905248b7768173cc1f4 /src/textparticle.cpp
parent114e76641ccde78fcb9f4ca2fcf7c9a909e176ba (diff)
downloadmana-993c98c3813b2ad7caf3dcd9761b4c9a17de39b6.tar.gz
mana-993c98c3813b2ad7caf3dcd9761b4c9a17de39b6.tar.bz2
mana-993c98c3813b2ad7caf3dcd9761b4c9a17de39b6.tar.xz
mana-993c98c3813b2ad7caf3dcd9761b4c9a17de39b6.zip
The color values of text particles are now stored in 3 integers instead of a Guichan color structure.
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r--src/textparticle.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index 2a2c50e8..ef4ebc48 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -26,11 +26,13 @@
#include "graphics.h"
TextParticle::TextParticle(Map *map, const std::string &text, gcn::Font *font,
- gcn::Color color):
+ int colorR, int colorG, int colorB):
Particle(map),
mText(text),
mTextFont(font),
- mTextColor(color)
+ mColorR(colorR),
+ mColorG(colorG),
+ mColorB(colorB)
{
}
@@ -57,7 +59,6 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
}
graphics->setFont(mTextFont);
- graphics->setColor(gcn::Color (mTextColor.r, mTextColor.g, mTextColor.b,
- alpha));
+ graphics->setColor(gcn::Color (mColorR, mColorG, mColorB, alpha));
graphics->drawText(mText, screenX, screenY, gcn::Graphics::CENTER);
}