summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/textrenderer.h6
-rw-r--r--src/gui/widgets/textpreview.cpp2
-rw-r--r--src/textparticle.cpp3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/textrenderer.h b/src/gui/textrenderer.h
index c8ff5833..ad9fbbad 100644
--- a/src/gui/textrenderer.h
+++ b/src/gui/textrenderer.h
@@ -42,7 +42,7 @@ class TextRenderer
const gcn::Color &color,
gcn::Font *font,
bool outline = false,
- bool shadow = false, int alpha = 255)
+ bool shadow = false)
{
graphics->setFont(font);
@@ -50,7 +50,7 @@ class TextRenderer
if (shadow)
{
graphics->setColor(guiPalette->getColor(Palette::SHADOW,
- alpha / 2));
+ color.a / 2));
if (outline)
{
graphics->drawText(text, x + 2, y + 2, align);
@@ -70,7 +70,7 @@ class TextRenderer
graphics->drawText(text, x + 2, y + 1, align);*/
// Text outline
- graphics->setColor(guiPalette->getColor(Palette::OUTLINE, alpha));
+ graphics->setColor(guiPalette->getColor(Palette::OUTLINE, color.a));
graphics->drawText(text, x + 1, y, align);
graphics->drawText(text, x - 1, y, align);
graphics->drawText(text, x, y + 1, align);
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 0d016b2f..0113c09f 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -77,5 +77,5 @@ void TextPreview::draw(gcn::Graphics* graphics)
TextRenderer::renderText(graphics, mText, 2, 2, gcn::Graphics::LEFT,
gcn::Color(mTextColor->r, mTextColor->g,
mTextColor->b, alpha),
- mFont, mOutline, mShadow, alpha);
+ mFont, mOutline, mShadow);
}
diff --git a/src/textparticle.cpp b/src/textparticle.cpp
index ae36a121..c639b937 100644
--- a/src/textparticle.cpp
+++ b/src/textparticle.cpp
@@ -53,8 +53,9 @@ void TextParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
alpha = alpha * mLifetimePast / mFadeIn;
gcn::Color color = *mColor;
+ color.a = (int)alpha;
TextRenderer::renderText(graphics, mText,
screenX, screenY, gcn::Graphics::CENTER,
- color, mTextFont, mOutline, false, (int) alpha);
+ color, mTextFont, mOutline, false);
}