summaryrefslogtreecommitdiff
path: root/src/textparticle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/textparticle.h')
-rw-r--r--src/textparticle.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/textparticle.h b/src/textparticle.h
index a61bf8d9..61241308 100644
--- a/src/textparticle.h
+++ b/src/textparticle.h
@@ -22,15 +22,11 @@
#ifndef TEXTPARTICLE_H
#define TEXTPARTICLE_H
-#include "guichanfwd.h"
#include "particle.h"
class TextParticle : public Particle
{
public:
- /**
- * Constructor.
- */
TextParticle(Map *map, const std::string &text,
const gcn::Color* color,
gcn::Font *font, bool outline = false);
@@ -38,11 +34,18 @@ class TextParticle : public Particle
/**
* Draws the particle image.
*/
- virtual void draw(Graphics *graphics, int offsetX, int offsetY) const;
+ virtual bool draw(Graphics *graphics, int offsetX, int offsetY) const;
// hack to improve text visibility
- virtual int getPixelY() const
- { return (int) (mPos.y + mPos.z); }
+ virtual int getDrawOrder() const
+ { return (int) (mPos.y) + 32; }
+
+ /** In contrary to other particles, text particles should not be
+ * obscured by objects, because their information is too
+ * important.
+ */
+ virtual bool drawnWhenBehind() const
+ { return true; }
private:
std::string mText; /**< Text of the particle. */