diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-06-23 14:44:20 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-06-23 14:44:20 +0000 |
commit | 4ec7db55c227d3c38f2358fa74ff2649d6583391 (patch) | |
tree | 20f784d7a90b1a22b377ffd0d55fb3251986b5e2 /src/textparticle.cpp | |
parent | 6e9aa693c6f07c99e5b84ee35570a14efe4df393 (diff) | |
download | mana-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.gz mana-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.bz2 mana-4ec7db55c227d3c38f2358fa74ff2649d6583391.tar.xz mana-4ec7db55c227d3c38f2358fa74ff2649d6583391.zip |
Implemented "alpha" particle property.
Diffstat (limited to 'src/textparticle.cpp')
-rw-r--r-- | src/textparticle.cpp | 4 |
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); } |