summaryrefslogtreecommitdiff
path: root/src/textparticle.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-06-23 14:44:20 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-06-23 14:44:20 +0000
commit4ec7db55c227d3c38f2358fa74ff2649d6583391 (patch)
tree20f784d7a90b1a22b377ffd0d55fb3251986b5e2 /src/textparticle.cpp
parent6e9aa693c6f07c99e5b84ee35570a14efe4df393 (diff)
downloadmana-client-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.gz
mana-client-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.bz2
mana-client-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.xz
mana-client-4ec7db55c227d3c38f2358fa74ff2649d6583391.zip
Implemented "alpha" particle property.
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r--src/textparticle.cpp4
1 files changed, 2 insertions, 2 deletions
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);
}