diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-03-12 22:42:42 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-12 21:53:00 -0600 |
commit | f0d5e3da15a308fcc962590330e7d8e39e8874b9 (patch) | |
tree | a0e7f61b1f6a2f2aee20549c9ac55a123ba3ccba /src/particle.cpp | |
parent | 5207b4cbb462cfa962a6f566897a6affd92eef94 (diff) | |
download | mana-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/particle.cpp')
-rw-r--r-- | src/particle.cpp | 17 |
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); |