From 4b8df221acc3bd3e681357df912bdbc7a1ce6c3f Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 23 Aug 2007 13:43:17 +0000 Subject: Removed two useless popup related methods, used generic close button functionality for the debug window and renamed Particle::mVector to Particle::mVelocity for clarity. --- src/textparticle.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/textparticle.cpp') 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); } -- cgit v1.2.3-70-g09d2