diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-16 19:26:59 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-07-16 19:26:59 +0000 |
commit | a6db4d8004da5ad985a5ff26c0c01976a5618449 (patch) | |
tree | 5ed3dea6a28222de87840a4d1966338098123993 /src/gui/window.cpp | |
parent | f4aedad02e8994f89a4137d175dba2666a7005bc (diff) | |
download | mana-a6db4d8004da5ad985a5ff26c0c01976a5618449.tar.gz mana-a6db4d8004da5ad985a5ff26c0c01976a5618449.tar.bz2 mana-a6db4d8004da5ad985a5ff26c0c01976a5618449.tar.xz mana-a6db4d8004da5ad985a5ff26c0c01976a5618449.zip |
Updated changelog, got rid of remaining extern SDL_Surface *screen cases,
fixed double free and cleaned up a bit.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index e6a55ea0..158e9272 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -22,13 +22,11 @@ */ #include "window.h" +#include "gui.h" #include "../resources/resourcemanager.h" #include "../log.h" #include "../main.h" -// TODO Check if we can get rid of this -extern SDL_Surface *screen; - WindowContainer *Window::windowContainer = NULL; int Window::instances = 0; ImageRect Window::border; @@ -302,26 +300,26 @@ void Window::mouseMotion(int x, int y) newDim.y = 0; } - if (newDim.x + newDim.width > screen->w) + if (newDim.x + newDim.width > guiGraphics->getWidth()) { if (mMouseResize) { - newDim.width = screen->w - newDim.x; + newDim.width = guiGraphics->getWidth() - newDim.x; } else { - newDim.x = screen->w - newDim.width; + newDim.x = guiGraphics->getWidth() - newDim.width; } } - if (newDim.y + newDim.height > screen->h) + if (newDim.y + newDim.height > guiGraphics->getHeight()) { if (mMouseResize) { - newDim.height = screen->h - newDim.y; + newDim.height = guiGraphics->getHeight() - newDim.y; } else { - newDim.y = screen->h - newDim.height; + newDim.y = guiGraphics->getHeight() - newDim.height; } } |