summaryrefslogtreecommitdiff
path: root/src/gui/sdlfont.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-31 16:54:22 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-01 03:56:16 +0300
commit761682b6254a3d43e65ff45e07683c61afa6f1e4 (patch)
tree2ee462840f3aadb1e96bfa5c6784ec2cc0d2861a /src/gui/sdlfont.cpp
parenta39f63cdfa5ce15b22f294a8bb1db3a036ce462d (diff)
downloadManaVerse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.gz
ManaVerse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.bz2
ManaVerse-761682b6254a3d43e65ff45e07683c61afa6f1e4.tar.xz
ManaVerse-761682b6254a3d43e65ff45e07683c61afa6f1e4.zip
Last part of fixes.
Diffstat (limited to 'src/gui/sdlfont.cpp')
-rw-r--r--src/gui/sdlfont.cpp16
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);
}
}