diff options
author | Ira Rice <irarice@gmail.com> | 2008-11-21 06:24:50 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-21 06:24:50 +0000 |
commit | f5c0ed3ec4216219494121721a4cce0c7ec4fb34 (patch) | |
tree | 3ffc912b8225d620af521b3b0537ae9a1a1ca1bc /src/gui/window.cpp | |
parent | be621542a7330c43c6d586286c4ef7411f83b6ea (diff) | |
download | mana-f5c0ed3ec4216219494121721a4cce0c7ec4fb34.tar.gz mana-f5c0ed3ec4216219494121721a4cce0c7ec4fb34.tar.bz2 mana-f5c0ed3ec4216219494121721a4cce0c7ec4fb34.tar.xz mana-f5c0ed3ec4216219494121721a4cce0c7ec4fb34.zip |
Changed windowing code to allow for multiple skins. This will be
modified in a bit so that there are no redundant skin loads, but for
now, it doesn't leak any more as well.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 4ace032b..48964121 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -48,7 +48,7 @@ ConfigListener *Window::windowConfigListener = 0; WindowContainer *Window::windowContainer = 0; int Window::instances = 0; int Window::mouseResize = 0; -ImageRect Window::border; +//ImageRect Window::border; Image *Window::closeImage = NULL; bool Window::mAlphaChanged = false; @@ -57,9 +57,9 @@ 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))); +// for_each(Window::border.grid, Window::border.grid + 9, +// std::bind2nd(std::mem_fun(&Image::setAlpha), +// config.getValue("guialpha", 0.8))); } }; @@ -142,18 +142,19 @@ Window::~Window() instances--; + // Clean up static resources + for( int i = 0; i < 9; i++ ) + { + delete border.grid[i]; + border.grid[i] = NULL; + } + if (instances == 0) { config.removeListener("guialpha", windowConfigListener); delete windowConfigListener; windowConfigListener = NULL; - // Clean up static resources - for( int i = 0; i < 9; i++ ) - { - delete border.grid[i]; - border.grid[i] = NULL; - } closeImage->decRef(); } |