Index: GUIControlFactory.cpp =================================================================== --- GUIControlFactory.cpp (revision 33032) +++ GUIControlFactory.cpp (working copy) @@ -273,6 +273,7 @@ const char *flipY = pNode->Attribute("flipy"); if (flipY && strcmpi(flipY, "true") == 0) image.orientation = 3 - image.orientation; // either 3 or 2 image.diffuse = pNode->Attribute("diffuse"); + image.diffuseColor.Parse(pNode->Attribute("colordiffuse"), 0); const char *background = pNode->Attribute("background"); if (background && strnicmp(background, "true", 4) == 0) image.useLarge = true; Index: GUITexture.cpp =================================================================== --- GUITexture.cpp (revision 33032) +++ GUITexture.cpp (working copy) @@ -27,6 +27,7 @@ using namespace std; CGUITextureBase::CGUITextureBase(float posX, float posY, float width, float height, const CTextureInfo& texture) { m_posX = posX; @@ -247,9 +248,11 @@ #define MIX_ALPHA(a,c) (((a * (c >> 24)) / 255) << 24) | (c & 0x00ffffff) - color_t color = m_diffuseColor; - if (m_alpha != 0xFF) color = MIX_ALPHA(m_alpha, m_diffuseColor); + // diffuse color + color_t color = (m_info.diffuseColor) ? m_info.diffuseColor : m_diffuseColor; color = g_graphicsContext.MergeAlpha(color); + if (m_alpha != 0xFF) + color = MIX_ALPHA(m_alpha, color); Draw(x, y, z, texture, diffuse, color, orientation); } @@ -496,8 +499,9 @@ } void CGUITextureBase::SetDiffuseColor(color_t color) -{ - m_diffuseColor = color; +{ + m_diffuseColor = color; + changed |= m_info.diffuseColor.Update(); } bool CGUITextureBase::ReadyToRender() const Index: GUITexture.h =================================================================== --- GUITexture.h (revision 33032) +++ GUITexture.h (working copy) @@ -30,6 +30,7 @@ #include "TextureManager.h" #include "Geometry.h" +#include "GUIInfoTypes.h" typedef uint32_t color_t; @@ -99,12 +100,14 @@ diffuse = right.diffuse; filename = right.filename; useLarge = right.useLarge; + diffuseColor = right.diffuseColor; }; bool useLarge; FRECT border; // scaled - unneeded if we get rid of scale on load - int orientation; // orientation of the texture (0 - 7 == EXIForientation - 1) - CStdString diffuse; // diffuse overlay texture - CStdString filename; // main texture file + int orientation; // orientation of the texture (0 - 7 == EXIForientation - 1) + CStdString diffuse; // diffuse overlay texture + CGUIInfoColor diffuseColor; // diffuse color + CStdString filename; // main texture file }; class CGUITextureBase