diff --git a/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp b/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp index ec7505a09..3eea9fe56 100644 --- a/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp @@ -269,6 +269,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) } GFX->getDrawUtil()->clearBitmapModulation(); + GFX->getDrawUtil()->setBitmapModulation(mColor); GFXTextureObject* texture = mTextureObject; diff --git a/Engine/source/gui/controls/guiBitmapBarCtrl.cpp b/Engine/source/gui/controls/guiBitmapBarCtrl.cpp index 441bcb26c..006309027 100644 --- a/Engine/source/gui/controls/guiBitmapBarCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapBarCtrl.cpp @@ -58,6 +58,7 @@ void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect) if (mTextureObject) { GFX->getDrawUtil()->clearBitmapModulation(); + GFX->getDrawUtil()->setBitmapModulation(mColor); F32 pct = (mPercent / 100.0); GFXTextureObject* texture = mTextureObject; Point2I modifiedSRC; diff --git a/Engine/source/gui/controls/guiBitmapCtrl.cpp b/Engine/source/gui/controls/guiBitmapCtrl.cpp index 1d0cd21c7..b87ca4101 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapCtrl.cpp @@ -56,7 +56,8 @@ ConsoleDocClass( GuiBitmapCtrl, GuiBitmapCtrl::GuiBitmapCtrl(void) : mBitmapName(), mStartPoint( 0, 0 ), - mWrap( false ) + mWrap( false ), + mColor(ColorI::WHITE) { } @@ -78,7 +79,8 @@ void GuiBitmapCtrl::initPersistFields() addProtectedField( "bitmap", TypeImageFilename, Offset( mBitmapName, GuiBitmapCtrl ), &setBitmapName, &defaultProtectedGetFn, - "The bitmap file to display in the control." ); + "The bitmap file to display in the control."); + addField("color", TypeColorI, Offset(mColor, GuiBitmapCtrl),"color mul"); addField( "wrap", TypeBool, Offset( mWrap, GuiBitmapCtrl ), "If true, the bitmap is tiled inside the control rather than stretched to fit." ); @@ -169,6 +171,7 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) if (mTextureObject) { GFX->getDrawUtil()->clearBitmapModulation(); + GFX->getDrawUtil()->setBitmapModulation(mColor); if(mWrap) { // We manually draw each repeat because non power of two textures will diff --git a/Engine/source/gui/controls/guiBitmapCtrl.h b/Engine/source/gui/controls/guiBitmapCtrl.h index 0eb8af353..27e3ddf85 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.h +++ b/Engine/source/gui/controls/guiBitmapCtrl.h @@ -44,6 +44,7 @@ class GuiBitmapCtrl : public GuiControl GFXTexHandle mTextureObject; Point2I mStartPoint; + ColorI mColor; /// If true, bitmap tiles inside control. Otherwise stretches. bool mWrap;