summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index c01b11c3..d6731e5d 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -99,7 +99,9 @@ bool CompoundSprite::draw(Graphics* graphics, int posX, int posY) const
redraw();
if (mAlpha == 1.0f && mImage)
+ {
return graphics->drawImage(mImage, posX + mOffsetX, posY + mOffsetY);
+ }
else if (mAlpha && mAlphaImage)
{
if (mAlphaImage->getAlpha() != mAlpha)
@@ -115,6 +117,8 @@ bool CompoundSprite::draw(Graphics* graphics, int posX, int posY) const
{
if (*it)
{
+ if ((*it)->getAlpha() != mAlpha)
+ (*it)->setAlpha(mAlpha);
(*it)->draw(graphics, posX, posY);
}
}