diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-23 13:43:17 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-23 13:43:17 +0000 |
commit | 4b8df221acc3bd3e681357df912bdbc7a1ce6c3f (patch) | |
tree | 3b3d196dcbeacc67b1479d56e3eccc14dfef07e1 /src/textparticle.cpp | |
parent | 4346b429cc875a85095fff271a8d82a46c2cfc91 (diff) | |
download | mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.gz mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.bz2 mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.tar.xz mana-4b8df221acc3bd3e681357df912bdbc7a1ce6c3f.zip |
Removed two useless popup related methods, used generic close button
functionality for the debug window and renamed Particle::mVector to
Particle::mVelocity for clarity.
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r-- | src/textparticle.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/textparticle.cpp b/src/textparticle.cpp index dd01d2fe..4ea4dbdc 100644 --- a/src/textparticle.cpp +++ b/src/textparticle.cpp @@ -26,7 +26,8 @@ #include "graphics.h" TextParticle::TextParticle(Map *map, const std::string &text, - int colorR, int colorG, int colorB, gcn::Font *font): + int colorR, int colorG, int colorB, + gcn::Font *font): Particle(map), mText(text), mTextFont(font), @@ -41,8 +42,8 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const if (!mAlive) return; - int screenX = (int)mPosX + offsetX; - int screenY = (int)mPosY - int(mPosZ) + offsetY; + int screenX = (int) mPosX + offsetX; + int screenY = (int) mPosY - (int) mPosZ + offsetY; int alpha = 255; @@ -50,7 +51,7 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const { alpha *= mLifetimeLeft; alpha /= mFadeOut; - }; + } if (mLifetimePast < mFadeIn) { @@ -59,6 +60,6 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const } graphics->setFont(mTextFont); - graphics->setColor(gcn::Color (mColorR, mColorG, mColorB, alpha)); + graphics->setColor(gcn::Color(mColorR, mColorG, mColorB, alpha)); graphics->drawText(mText, screenX, screenY, gcn::Graphics::CENTER); } |