From e3682e2cdcb59c36792f6f9c39569e0af01088f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 01:58:52 +0300 Subject: Dont set global color variables before drawing text. This allow not set actual OpenGL color on each call because it useless for drawing text. --- src/particle/textparticle.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/particle') diff --git a/src/particle/textparticle.cpp b/src/particle/textparticle.cpp index ab07c33a5..aa506e75f 100644 --- a/src/particle/textparticle.cpp +++ b/src/particle/textparticle.cpp @@ -77,10 +77,19 @@ void TextParticle::draw(Graphics *const graphics, graphics->setColor(color); if (mOutline) { - graphics->setColor2(theme->getColor( - Theme::OUTLINE, static_cast(alpha))); + const Color &color2 = theme->getColor(Theme::OUTLINE, + static_cast(alpha)); + mTextFont->drawString(graphics, + color, color2, + mText, + screenX - mTextWidth, screenY); + } + else + { + mTextFont->drawString(graphics, + color, color, + mText, screenX - mTextWidth, screenY); } - mTextFont->drawString(graphics, mText, screenX - mTextWidth, screenY); BLOCK_END("TextParticle::draw") return; } -- cgit v1.2.3-60-g2f50