From 4ec7db55c227d3c38f2358fa74ff2649d6583391 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 23 Jun 2008 14:44:20 +0000 Subject: Implemented "alpha" particle property. --- src/textparticle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/textparticle.cpp') diff --git a/src/textparticle.cpp b/src/textparticle.cpp index 4bc859cd..89466006 100644 --- a/src/textparticle.cpp +++ b/src/textparticle.cpp @@ -45,7 +45,7 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const int screenX = (int) mPos.x + offsetX; int screenY = (int) mPos.y - (int) mPos.z + offsetY; - int alpha = 255; + float alpha = mAlpha * 255.0f; if (mLifetimeLeft > -1 && mLifetimeLeft < mFadeOut) { @@ -60,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, (int)alpha)); graphics->drawText(mText, screenX, screenY, gcn::Graphics::CENTER); } -- cgit v1.2.3-70-g09d2