Browse Source

- Use the GUI profile fill-color when rendering GUI via the SpriteProxyBase.

MelvMay-GG 12 years ago
parent
commit
aba7fde
1 changed files with 4 additions and 2 deletions
  1. 4 2
      engine/source/2d/core/SpriteProxyBase.cc

+ 4 - 2
engine/source/2d/core/SpriteProxyBase.cc

@@ -209,8 +209,9 @@ void SpriteProxyBase::renderGui( GuiControl& owner, Point2I offset, const RectI
             RectI destinationRegion(offset, owner.mBounds.extent);
 
             // Render image.
-            dglClearBitmapModulation();
+			dglSetBitmapModulation( owner.mProfile->mFillColor );
             dglDrawBitmapStretchSR( mImageAsset->getImageTexture(), destinationRegion, sourceRegion );
+            dglClearBitmapModulation();
         }
         else
         {
@@ -231,8 +232,9 @@ void SpriteProxyBase::renderGui( GuiControl& owner, Point2I offset, const RectI
             RectI destinationRegion(offset, owner.mBounds.extent);
 
             // Render animation image.
-            dglClearBitmapModulation();
+			dglSetBitmapModulation( owner.mProfile->mFillColor );
             dglDrawBitmapStretchSR( mpAnimationController->getImageTexture(), destinationRegion, sourceRegion );
+            dglClearBitmapModulation();
 
             // Update control.
             owner.setUpdate();