summaryrefslogtreecommitdiff
path: root/src/gui/checkbox.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-03 17:33:47 -0700
committerIra Rice <irarice@gmail.com>2009-02-03 17:33:47 -0700
commitc6cf9a6a9c03f17362171aeed1a22244d99b7530 (patch)
tree66c6d358a461e119fac31dc9eac8b2b607595a13 /src/gui/checkbox.cpp
parent7d45452187b1c2911b688bbed5fb8981a67b1934 (diff)
downloadmana-c6cf9a6a9c03f17362171aeed1a22244d99b7530.tar.gz
mana-c6cf9a6a9c03f17362171aeed1a22244d99b7530.tar.bz2
mana-c6cf9a6a9c03f17362171aeed1a22244d99b7530.tar.xz
mana-c6cf9a6a9c03f17362171aeed1a22244d99b7530.zip
Disable alpha values affecting two widgets which would otherwise take
alpha values under SDL. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/checkbox.cpp')
-rw-r--r--src/gui/checkbox.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp
index 7fa4fa81..511ed34c 100644
--- a/src/gui/checkbox.cpp
+++ b/src/gui/checkbox.cpp
@@ -45,10 +45,13 @@ CheckBox::CheckBox(const std::string& caption, bool selected):
checkBoxChecked = checkBox->getSubImage(9, 0, 9, 10);
checkBoxDisabled = checkBox->getSubImage(18, 0, 9, 10);
checkBoxDisabledChecked = checkBox->getSubImage(27, 0, 9, 10);
- checkBoxNormal->setAlpha(mAlpha);
- checkBoxChecked->setAlpha(mAlpha);
- checkBoxDisabled->setAlpha(mAlpha);
- checkBoxDisabledChecked->setAlpha(mAlpha);
+ if (config.getValue("opengl", 0))
+ {
+ checkBoxNormal->setAlpha(mAlpha);
+ checkBoxChecked->setAlpha(mAlpha);
+ checkBoxDisabled->setAlpha(mAlpha);
+ checkBoxDisabledChecked->setAlpha(mAlpha);
+ }
checkBox->decRef();
}
@@ -84,7 +87,8 @@ void CheckBox::drawBox(gcn::Graphics* graphics)
else
box = checkBoxDisabled;
- if (config.getValue("guialpha", 0.8) != mAlpha)
+ if (config.getValue("guialpha", 0.8) != mAlpha &&
+ config.getValue("opengl", 0))
{
mAlpha = config.getValue("guialpha", 0.8);
checkBoxNormal->setAlpha(mAlpha);