summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/speechbubble.cpp4
-rw-r--r--src/gui/window.cpp21
-rw-r--r--src/gui/window.h5
3 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 2ab80bd9..6af16496 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -29,8 +29,8 @@
// TODO: Fix windows so that they can each load their own skins without the
// other windows overriding another window's skin.
-SpeechBubble::SpeechBubble()//:
-// Window("Message", false, NULL, "graphics/gui/speechbubble.xml")
+SpeechBubble::SpeechBubble():
+ Window("Message", false, NULL, "graphics/gui/speechbubble.xml")
{
mSpeechBox = new TextBox();
mSpeechBox->setEditable(false);
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();
}
diff --git a/src/gui/window.h b/src/gui/window.h
index 3bb41a95..9380fc88 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -26,12 +26,11 @@
#include <guichan/widgets/window.hpp>
+#include "../graphics.h"
#include "../guichanfwd.h"
class ConfigListener;
class GCContainer;
-class Image;
-class ImageRect;
class ResizeGrip;
class WindowContainer;
@@ -291,7 +290,7 @@ class Window : public gcn::Window, gcn::WidgetListener
static int mouseResize; /**< Active resize handles */
static int instances; /**< Number of Window instances */
- static ImageRect border; /**< The window border and background */
+ ImageRect border; /**< The window border and background */
static Image *closeImage; /**< Close Button Image */
/**