summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index e97e9416..797b4be9 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -25,10 +25,7 @@
#include <guichan/exception.hpp>
-#include <guichan/widgets/icon.hpp>
-
#include "gui.h"
-#include "gccontainer.h"
#include "window.h"
#include "windowcontainer.h"
@@ -37,7 +34,6 @@
#include "../configlistener.h"
#include "../configuration.h"
-#include "../graphics.h"
#include "../log.h"
#include "../resources/image.h"
@@ -58,9 +54,6 @@ class WindowConfigListener : public ConfigListener
void optionChanged(const std::string &)
{
Window::mAlphaChanged = true;
-// for_each(Window::border.grid, Window::border.grid + 9,
-// std::bind2nd(std::mem_fun(&Image::setAlpha),
-// config.getValue("guialpha", 0.8)));
}
};
@@ -195,6 +188,15 @@ void Window::draw(gcn::Graphics *graphics)
getPadding()
);
}
+
+ // Update window alpha values
+ if (mAlphaChanged)
+ {
+ for_each(border.grid, border.grid + 9,
+ std::bind2nd(std::mem_fun(&Image::setAlpha),
+ config.getValue("guialpha", 0.8)));
+ closeImage->setAlpha(config.getValue("guialpha", 0.8));
+ }
drawChildren(graphics);
}