summaryrefslogtreecommitdiff
path: root/src/particle
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 22:17:22 +0300
commit6e6c5b2ba399e0ed364ada843c4c759ee54de219 (patch)
tree562e6a840c856ba8c4d35c6806020289c65d54d2 /src/particle
parent82ac4641828ec7387863bb18cf4493190c4cc68f (diff)
downloadmv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.gz
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.bz2
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.tar.xz
mv-6e6c5b2ba399e0ed364ada843c4c759ee54de219.zip
combine font classes in one.
Diffstat (limited to 'src/particle')
-rw-r--r--src/particle/particle.cpp4
-rw-r--r--src/particle/particle.h7
-rw-r--r--src/particle/textparticle.cpp4
-rw-r--r--src/particle/textparticle.h4
4 files changed, 10 insertions, 9 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index a9cc9993f..83ec97521 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -415,7 +415,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,
- gcn::Font *const font,
+ Font *const font,
const bool outline)
{
Particle *const newParticle = new TextParticle(text, color, font, outline);
@@ -439,7 +439,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,
- gcn::Font *const font,
+ Font *const font,
const bool outline)
{
Particle *const newParticle = new TextParticle(text, color, font, outline);
diff --git a/src/particle/particle.h b/src/particle/particle.h
index f75803772..f69770513 100644
--- a/src/particle/particle.h
+++ b/src/particle/particle.h
@@ -36,9 +36,10 @@ class ParticleEmitter;
namespace gcn
{
class Color;
- class Font;
}
+class Font;
+
typedef std::list<Particle *> Particles;
typedef Particles::iterator ParticleIterator;
typedef Particles::const_iterator ParticleConstIterator;
@@ -136,7 +137,7 @@ class Particle : public Actor
Particle *addTextSplashEffect(const std::string &text,
const int x, const int y,
const gcn::Color *const color,
- gcn::Font *const font,
+ Font *const font,
const bool outline = false);
/**
@@ -145,7 +146,7 @@ class Particle : public Actor
Particle *addTextRiseFadeOutEffect(const std::string &text,
const int x, const int y,
const gcn::Color *const color,
- gcn::Font *const font,
+ Font *const font,
const bool outline = false);
/**
diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp
index bf72baf25..1ac6ac6c2 100644
--- a/src/particle/textparticle.cpp
+++ b/src/particle/textparticle.cpp
@@ -27,13 +27,13 @@
#include "gui/theme.h"
#include "gui/base/color.hpp"
-#include "gui/base/font.hpp"
+#include "gui/font.h"
#include "debug.h"
TextParticle::TextParticle(const std::string &text,
const gcn::Color *const color,
- gcn::Font *const font, const bool outline) :
+ Font *const font, const bool outline) :
Particle(),
mText(text),
mTextFont(font),
diff --git a/src/particle/textparticle.h b/src/particle/textparticle.h
index eb8a160e1..0d598508d 100644
--- a/src/particle/textparticle.h
+++ b/src/particle/textparticle.h
@@ -33,7 +33,7 @@ class TextParticle final : public Particle
*/
TextParticle(const std::string &text,
const gcn::Color *const color,
- gcn::Font *const font, const bool outline = false);
+ Font *const font, const bool outline = false);
A_DELETE_COPY(TextParticle)
@@ -53,7 +53,7 @@ class TextParticle final : public Particle
private:
std::string mText; /**< Text of the particle. */
- gcn::Font *mTextFont; /**< Font used for drawing the text. */
+ Font *mTextFont; /**< Font used for drawing the text. */
const gcn::Color *mColor; /**< Color used for drawing the text. */
int mTextWidth;
bool mOutline; /**< Make the text better readable */