summaryrefslogtreecommitdiff
path: root/src/particle.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/particle.cpp
parent5207b4cbb462cfa962a6f566897a6affd92eef94 (diff)
downloadmana-client-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.gz
mana-client-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.bz2
mana-client-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.xz
mana-client-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/particle.cpp')
-rw-r--r--src/particle.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/particle.cpp b/src/particle.cpp
index 8bc764ba..e56435ed 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -325,12 +325,10 @@ Particle* Particle::addEffect(const std::string &particleEffectFile,
return newParticle;
}
-Particle *Particle::addTextSplashEffect(const std::string &text,
- int colorR, int colorG, int colorB,
- gcn::Font *font, int x, int y, bool outline)
+Particle *Particle::addTextSplashEffect(const std::string &text, int x, int y,
+ const gcn::Color *color, gcn::Font *font, bool outline)
{
- Particle *newParticle = new TextParticle(mMap, text, colorR, colorG, colorB,
- font, outline);
+ Particle *newParticle = new TextParticle(mMap, text, color, font, outline);
newParticle->moveTo(x, y);
newParticle->setVelocity(((rand() % 100) - 50) / 200.0f, // X
((rand() % 100) - 50) / 200.0f, // Y
@@ -346,13 +344,8 @@ Particle *Particle::addTextSplashEffect(const std::string &text,
}
Particle *Particle::addTextRiseFadeOutEffect(const std::string &text,
- gcn::Font *font,
- int x, int y,
- int colorR, int colorG,
- int colorB, bool outline)
-{
- Particle *newParticle = new TextParticle(mMap, text, colorR, colorG, colorB,
- font, outline);
+ int x, int y, const gcn::Color *color, gcn::Font *font, bool outline){
+ Particle *newParticle = new TextParticle(mMap, text, color, font, outline);
newParticle->moveTo(x, y);
newParticle->setVelocity(0.0f, 0.0f, 0.5f);
newParticle->setGravity(0.0015f);