diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-31 16:54:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-01 03:56:16 +0300 |
commit | 761682b6254a3d43e65ff45e07683c61afa6f1e4 (patch) | |
tree | 2ee462840f3aadb1e96bfa5c6784ec2cc0d2861a /src/gui/sdlfont.cpp | |
parent | a39f63cdfa5ce15b22f294a8bb1db3a036ce462d (diff) | |
download | plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.gz plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.bz2 plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.xz plus-761682b6254a3d43e65ff45e07683c61afa6f1e4.zip |
Last part of fixes.
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); } } |