summaryrefslogtreecommitdiff
path: root/src/animatedsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-01 15:34:45 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-01 18:25:11 +0300
commit4e7096f15eba73e6ea28066df6ab389aab3f052c (patch)
treeba8902bd4b4f0137925ab98c89beaa6233a44a51 /src/animatedsprite.cpp
parent6661187fdc8278c9f9a15c6cdb4d85301a3e548c (diff)
downloadplus-4e7096f15eba73e6ea28066df6ab389aab3f052c.tar.gz
plus-4e7096f15eba73e6ea28066df6ab389aab3f052c.tar.bz2
plus-4e7096f15eba73e6ea28066df6ab389aab3f052c.tar.xz
plus-4e7096f15eba73e6ea28066df6ab389aab3f052c.zip
Fix random opacity issue in complex sprites in software mode.
Diffstat (limited to 'src/animatedsprite.cpp')
-rw-r--r--src/animatedsprite.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index 8ccdd61e5..0b9eb5ddd 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -298,3 +298,11 @@ const Image* AnimatedSprite::getImage() const
{
return mFrame ? mFrame->image : 0;
}
+
+void AnimatedSprite::setAlpha(float alpha)
+{
+ mAlpha = alpha;
+
+ if (mFrame && mFrame->image && mFrame->image->getAlpha() != mAlpha)
+ mFrame->image->setAlpha(mAlpha);
+}