diff options
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r-- | src/gui/sdlfont.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index 7e0114cb8..197b0f9cd 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -249,7 +249,11 @@ void SDLFont::drawString(gcn::Graphics *graphics, mCreateCounter ++; #endif cache->push_front(chunk); - cache->front().generate(mFont, alpha); + SDLTextChunk &data = cache->front(); + data.generate(mFont, alpha); + + if (data.img) + g->drawImage(data.img, x, y); if (!mCleanTime) { @@ -260,16 +264,12 @@ void SDLFont::drawString(gcn::Graphics *graphics, doClean(); mCleanTime = cur_time + CLEAN_TIME; } - if (cache->front().img) - { -// cache->front().img->setAlpha(alpha); - g->drawImage(cache->front().img, x, y); - } } else if (cache->front().img) { - cache->front().img->setAlpha(alpha); - g->drawImage(cache->front().img, x, y); + Image *image = cache->front().img; + image->setAlpha(alpha); + g->drawImage(image, x, y); } } |