summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-16 15:50:00 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-16 15:50:00 +0000
commit32badd4b6f843cb74fdc3238fe92119518c8c0ab (patch)
treeade2ace7f5ef62ae9fd14c6409d9c2df43a2348b /src/gui/window.cpp
parent65ccfccfc1e35a2e65638aea61c46e4e51bd874e (diff)
downloadmana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.gz
mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.bz2
mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.tar.xz
mana-32badd4b6f843cb74fdc3238fe92119518c8c0ab.zip
A bunch of cosmetic changes.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 3b577116..492fe292 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -46,25 +46,12 @@ Image *Window::resizeGrip;
class WindowConfigListener : public ConfigListener
{
- public:
- /**
- * Called when an config option changes.
- */
- void optionChanged(const std::string &name)
- {
- if (name == "guialpha")
- {
- float guiAlpha = config.getValue("guialpha", 0.8);
-
- for (int i = 0; i < 9; i++)
- {
- if (Window::border.grid[i]->getAlpha() != guiAlpha)
- {
- Window::border.grid[i]->setAlpha(guiAlpha);
- }
- }
- }
- }
+ void optionChanged(const std::string &)
+ {
+ for_each(Window::border.grid, Window::border.grid + 9,
+ std::bind2nd(std::mem_fun(&Image::setAlpha),
+ config.getValue("guialpha", 0.8)));
+ }
};
Window::Window(const std::string& caption, bool modal, Window *parent):