![]() |
ManaPlus
|
#include <textparticle.h>
Public Member Functions | |
| TextParticle (const std::string &text, const Color *const color, Font *const font, const bool outline) | |
| void | draw (Graphics *const graphics, const int offsetX, const int offsetY) const |
| int | getPixelY () const |
| int | getSortPixelY () const |
Public Member Functions inherited from Particle | |
| Particle () | |
| ~Particle () | |
| void | clear () |
| bool | update () |
| Particle * | addEffect (const std::string &particleEffectFile, const int pixelX, const int pixelY, const int rotation) |
| void | addEmitter (ParticleEmitter *const emitter) |
| void | moveTo (const Vector &pos) |
| void | moveTo (const float x, const float y) |
| void | moveBy (const Vector &change) |
| void | setLifetime (const int lifetime) |
| void | setFadeOut (const int fadeOut) |
| void | setFadeIn (const int fadeIn) |
| void | setVelocity (const float x, const float y, const float z) |
| void | setGravity (const float gravity) |
| void | setRandomness (const int r) |
| void | setBounce (const float bouncieness) |
| void | setFollow (const bool follow) |
| bool | doesFollow () const |
| void | setDestination (Particle *const target, const float accel, const float moment) |
| void | setDieDistance (const float dist) |
| void | adjustEmitterSize (const int w, const int h) |
| void | setAllowSizeAdjust (const bool adjust) |
| bool | isAlive () const |
| void | prepareToDie () |
| bool | isExtinct () const |
| void | kill () |
| void | disableAutoDelete () |
| int | getNumberOfLayers () const |
| float | getAlpha () const |
| void | setAlpha (const float alpha) |
| virtual void | setDeathEffect (const std::string &effectFile, const signed char conditions) |
| void | setActor (const BeingId actor) |
Public Member Functions inherited from Actor | |
| virtual | ~Actor () |
| virtual int | getWidth () const |
| virtual int | getHeight () const |
| const Vector & | getPixelPositionF () const |
| virtual void | setPixelPositionF (const Vector &pos) |
| int | getPixelX () const |
| virtual int | getTileX () const |
| virtual int | getTileY () const |
| virtual void | setMap (Map *const map) |
| const Map * | getMap () const |
Private Attributes | |
| std::string | mText |
| Font * | mTextFont |
| const Color * | mColor |
| int | mTextWidth |
| bool | mOutline |
Additional Inherited Members | |
Data Fields inherited from Actor | |
| int | mPixelX |
| int | mPixelY |
Protected Member Functions inherited from Particle | |
| void | updateSelf () |
Protected Member Functions inherited from Actor | |
| Actor () | |
Protected Attributes inherited from Particle | |
| float | mAlpha |
| int | mLifetimeLeft |
| int | mLifetimePast |
| int | mFadeOut |
| int | mFadeIn |
| Vector | mVelocity |
| AliveStatusT | mAlive |
| ParticleTypeT | mType |
| SimpleAnimation * | mAnimation |
| Image * | mImage |
| BeingId | mActor |
Protected Attributes inherited from Actor | |
| Map * | mMap |
| Vector | mPos |
| int | mYDiff |
Definition at line 29 of file textparticle.h.
| TextParticle::TextParticle | ( | const std::string & | text, |
| const Color *const | color, | ||
| Font *const | font, | ||
| const bool | outline | ||
| ) |
Constructor.
Definition at line 34 of file textparticle.cpp.
References Particle::mType, and ParticleType::Text.
|
virtual |
Draws the particle image.
Reimplemented from Particle.
Definition at line 48 of file textparticle.cpp.
References Color::a, BLOCK_END, BLOCK_START, CAST_S32, CAST_U32, Theme::getColor(), anonymous_namespace{mrand.cpp}::mPos, restrict, and theme.
|
inlinevirtual |
Necessary for sorting with the other sprites.
Reimplemented from Particle.
Definition at line 51 of file textparticle.h.
References CAST_S32, Actor::mPos, Vector::y, and Vector::z.
|
inlinevirtual |
|
private |
Definition at line 64 of file textparticle.h.
|
private |
Definition at line 67 of file textparticle.h.
|
private |
< Text of the particle. Font used for drawing the text.
Definition at line 60 of file textparticle.h.
|
private |
Color used for drawing the text.
Definition at line 62 of file textparticle.h.
|
private |
Make the text better readable
Definition at line 65 of file textparticle.h.