diff options
Diffstat (limited to 'src/textparticle.h')
-rw-r--r-- | src/textparticle.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/textparticle.h b/src/textparticle.h index 2791cb03..61241308 100644 --- a/src/textparticle.h +++ b/src/textparticle.h @@ -37,8 +37,15 @@ class TextParticle : public Particle 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. */ |