Fixed ImageComponent not using mColorShift's transparency.

Fixes using transparency in <color> tag.
Updated documentation to emphasize the fact that you can control transparency with the <color> tag.
This commit is contained in:
Aloshi 2014-05-24 10:49:59 -05:00
parent 7ba1bce133
commit 6cf6e62b85
2 changed files with 2 additions and 2 deletions

View file

@ -400,7 +400,7 @@ Can be created as an extra.
* `tile` - type: BOOLEAN. * `tile` - type: BOOLEAN.
- If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds. - If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds.
* `color` - type: COLOR. * `color` - type: COLOR.
- Multiply each pixel's color by this color. For example, an all-white image with `<color>FF0000</color>` would become completely red. - Multiply each pixel's color by this color. For example, an all-white image with `<color>FF0000</color>` would become completely red. You can also control the transparency of an image with `<color>FFFFFFAA</color>` - keeping all the pixels their normal color and only affecting the alpha channel.
#### text #### text

View file

@ -232,7 +232,7 @@ void ImageComponent::updateVertices()
void ImageComponent::updateColors() void ImageComponent::updateColors()
{ {
Renderer::buildGLColorArray(mColors, (mColorShift >> 8 << 8)| (getOpacity()), 6); Renderer::buildGLColorArray(mColors, mColorShift, 6);
} }
void ImageComponent::render(const Eigen::Affine3f& parentTrans) void ImageComponent::render(const Eigen::Affine3f& parentTrans)