summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-20 19:01:02 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-21 20:49:11 -0600
commitfa058a891352ab4f85bafbf4e819c013ddfe4df7 (patch)
treee171acfceab0135a2b811338448681ad0408200c /src/gui/theme.cpp
parenta8273ca217ee08f718e6acb3786f3197dff7915c (diff)
downloadmana-fa058a891352ab4f85bafbf4e819c013ddfe4df7.tar.gz
mana-fa058a891352ab4f85bafbf4e819c013ddfe4df7.tar.bz2
mana-fa058a891352ab4f85bafbf4e819c013ddfe4df7.tar.xz
mana-fa058a891352ab4f85bafbf4e819c013ddfe4df7.zip
Make the Dye class more flexible and fix an issue in it
After the last change, it could go over the end of the colors array. Reviewed-by: Chuck Miller Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 8d447c2f..f42b0fc2 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -140,9 +140,7 @@ gcn::Color Theme::getProgressColor(int type, float progress)
DyePalette *dye = mInstance->mProgressColors[type];
int color[3] = {0, 0, 0};
- int intensity = (int) (255 * progress);
-
- dye->getColor(intensity, color);
+ dye->getColor(progress, color);
return gcn::Color(color[0], color[1], color[2]);
}