summaryrefslogtreecommitdiff
path: root/src/gui/checkbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-16 20:54:00 +0100
committerIra Rice <irarice@gmail.com>2009-02-16 14:49:03 -0700
commit4924e4a50ae31c30f783285f6e10ac3651c1e6e8 (patch)
tree6c0250fa3d53fc24fe4547cb55268aecf6fd5544 /src/gui/checkbox.cpp
parent5216cdc6569b9c7db80529ae9b4c00ea0d14abbc (diff)
downloadmana-4924e4a50ae31c30f783285f6e10ac3651c1e6e8.tar.gz
mana-4924e4a50ae31c30f783285f6e10ac3651c1e6e8.tar.bz2
mana-4924e4a50ae31c30f783285f6e10ac3651c1e6e8.tar.xz
mana-4924e4a50ae31c30f783285f6e10ac3651c1e6e8.zip
Fixed GUI opacity in SDL mode
By using indexed instead of alpha-layered images, the GUI opacity can also be supported in software mode.
Diffstat (limited to 'src/gui/checkbox.cpp')
-rw-r--r--src/gui/checkbox.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp
index 7a3e2fde..413c28d0 100644
--- a/src/gui/checkbox.cpp
+++ b/src/gui/checkbox.cpp
@@ -46,13 +46,10 @@ 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);
- if (config.getValue("opengl", 0))
- {
- checkBoxNormal->setAlpha(mAlpha);
- checkBoxChecked->setAlpha(mAlpha);
- checkBoxDisabled->setAlpha(mAlpha);
- checkBoxDisabledChecked->setAlpha(mAlpha);
- }
+ checkBoxNormal->setAlpha(mAlpha);
+ checkBoxChecked->setAlpha(mAlpha);
+ checkBoxDisabled->setAlpha(mAlpha);
+ checkBoxDisabledChecked->setAlpha(mAlpha);
checkBox->decRef();
}
@@ -88,8 +85,7 @@ void CheckBox::drawBox(gcn::Graphics* graphics)
else
box = checkBoxDisabled;
- if (config.getValue("guialpha", 0.8) != mAlpha &&
- config.getValue("opengl", 0))
+ if (config.getValue("guialpha", 0.8) != mAlpha)
{
mAlpha = config.getValue("guialpha", 0.8);
checkBoxNormal->setAlpha(mAlpha);