From 4e7096f15eba73e6ea28066df6ab389aab3f052c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Aug 2011 15:34:45 +0300 Subject: Fix random opacity issue in complex sprites in software mode. --- src/animatedsprite.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/animatedsprite.cpp') 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); +} -- cgit v1.2.3-60-g2f50