This addon is dependent on the bug fix from that thread. Once that fix is made. You can make images have their own individual colors (including tranparencies) by doing this:
Add this to IGUIImage.h:
Code: Select all
virtual void setOverrideColor(video::SColor color) = 0;
Code: Select all
virtual void setOverrideColor(video::SColor color);
In draw change:
Code: Select all
if (Texture)
driver->draw2DImage(Texture, AbsoluteRect.UpperLeftCorner,
core::rect<s32>(core::position2d<s32>(0,0), Texture->getOriginalSize()),
&AbsoluteClippingRect);
Code: Select all
if (Texture)
driver->draw2DImage(Texture, AbsoluteRect.UpperLeftCorner,
core::rect<s32>(core::position2d<s32>(0,0), Texture->getOriginalSize()),
&AbsoluteClippingRect, OverrideColor, true);
Code: Select all
void CGUIImage::setOverrideColor(video::SColor color)
{
OverrideColor = color;
}