From 6cf6e62b85c23fc30d53d9a38ba056a60b043209 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sat, 24 May 2014 10:49:59 -0500 Subject: [PATCH] Fixed ImageComponent not using mColorShift's transparency. Fixes using transparency in tag. Updated documentation to emphasize the fact that you can control transparency with the tag. --- THEMES.md | 2 +- src/components/ImageComponent.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/THEMES.md b/THEMES.md index 323c232a8..65c8504ee 100644 --- a/THEMES.md +++ b/THEMES.md @@ -400,7 +400,7 @@ Can be created as an extra. * `tile` - type: BOOLEAN. - If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds. * `color` - type: COLOR. - - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. + - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. You can also control the transparency of an image with `FFFFFFAA` - keeping all the pixels their normal color and only affecting the alpha channel. #### text diff --git a/src/components/ImageComponent.cpp b/src/components/ImageComponent.cpp index 09fbfeb82..c8b228e1a 100644 --- a/src/components/ImageComponent.cpp +++ b/src/components/ImageComponent.cpp @@ -232,7 +232,7 @@ void ImageComponent::updateVertices() void ImageComponent::updateColors() { - Renderer::buildGLColorArray(mColors, (mColorShift >> 8 << 8)| (getOpacity()), 6); + Renderer::buildGLColorArray(mColors, mColorShift, 6); } void ImageComponent::render(const Eigen::Affine3f& parentTrans)