From 48646db55005a0da079bd2c945875dc8225e2f86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Feb 2014 14:21:27 +0300 Subject: Move color into gui dir. --- src/particle/particle.cpp | 4 ++-- src/particle/particle.h | 13 ++++--------- src/particle/textparticle.cpp | 6 +++--- src/particle/textparticle.h | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) (limited to 'src/particle') diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 83ec97521..c446fa177 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -414,7 +414,7 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, Particle *Particle::addTextSplashEffect(const std::string &text, const int x, const int y, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline) { @@ -438,7 +438,7 @@ Particle *Particle::addTextSplashEffect(const std::string &text, Particle *Particle::addTextRiseFadeOutEffect(const std::string &text, const int x, const int y, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline) { diff --git a/src/particle/particle.h b/src/particle/particle.h index f69770513..491232b17 100644 --- a/src/particle/particle.h +++ b/src/particle/particle.h @@ -30,16 +30,11 @@ #include #include +class Color; +class Font; class Particle; class ParticleEmitter; -namespace gcn -{ - class Color; -} - -class Font; - typedef std::list Particles; typedef Particles::iterator ParticleIterator; typedef Particles::const_iterator ParticleConstIterator; @@ -136,7 +131,7 @@ class Particle : public Actor */ Particle *addTextSplashEffect(const std::string &text, const int x, const int y, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline = false); @@ -145,7 +140,7 @@ class Particle : public Actor */ Particle *addTextRiseFadeOutEffect(const std::string &text, const int x, const int y, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline = false); diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp index 1ac6ac6c2..41ea683f6 100644 --- a/src/particle/textparticle.cpp +++ b/src/particle/textparticle.cpp @@ -26,13 +26,13 @@ #include "gui/theme.h" -#include "gui/base/color.hpp" +#include "gui/color.h" #include "gui/font.h" #include "debug.h" TextParticle::TextParticle(const std::string &text, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline) : Particle(), mText(text), @@ -74,7 +74,7 @@ void TextParticle::draw(Graphics *const graphics, / static_cast(mFadeIn); } - gcn::Color color = *mColor; + Color color = *mColor; color.a = static_cast(alpha); graphics->setColor(color); diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h index 0d598508d..ec586c3a9 100644 --- a/src/particle/textparticle.h +++ b/src/particle/textparticle.h @@ -32,7 +32,7 @@ class TextParticle final : public Particle * Constructor. */ TextParticle(const std::string &text, - const gcn::Color *const color, + const Color *const color, Font *const font, const bool outline = false); A_DELETE_COPY(TextParticle) @@ -54,7 +54,7 @@ class TextParticle final : public Particle private: std::string mText; /**< Text of the particle. */ Font *mTextFont; /**< Font used for drawing the text. */ - const gcn::Color *mColor; /**< Color used for drawing the text. */ + const Color *mColor; /**< Color used for drawing the text. */ int mTextWidth; bool mOutline; /**< Make the text better readable */ }; -- cgit v1.2.3-60-g2f50