summaryrefslogtreecommitdiff
path: root/src/resources/theme.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-08-02 03:30:03 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-08-02 03:30:23 +0200
commit33032808e024b6dade5b751f15f4878edd507787 (patch)
treef451fba79080bdeb0c4d9f10c215cff3653491e7 /src/resources/theme.cpp
parent7e8ba785e95385d32024e151697d2e6d4ec61ef3 (diff)
downloadmana-client-33032808e024b6dade5b751f15f4878edd507787.tar.gz
mana-client-33032808e024b6dade5b751f15f4878edd507787.tar.bz2
mana-client-33032808e024b6dade5b751f15f4878edd507787.tar.xz
mana-client-33032808e024b6dade5b751f15f4878edd507787.zip
Dynamically scaling background for login screen
Hacked Graphics::drawRescaledImage a bit to make it work...
Diffstat (limited to 'src/resources/theme.cpp')
-rw-r--r--src/resources/theme.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index dde7bb3c..036cd4a3 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -82,8 +82,12 @@ Skin::~Skin()
void Skin::updateAlpha(float minimumOpacityAllowed)
{
const float alpha = std::max(minimumOpacityAllowed,
- config.getFloatValue("guialpha"));
+ config.getFloatValue("guialpha"));
+ setAlpha(alpha);
+}
+void Skin::setAlpha(float alpha)
+{
for_each(mBorder.grid, mBorder.grid + 9,
std::bind2nd(std::mem_fun(&Image::setAlpha), alpha));