summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-21 12:30:36 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-22 11:12:17 +0100
commitc4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb (patch)
treed87655455c0a331c73bf5b762701fafaa5348688 /src/gui/widgets/window.h
parent0d613d75b732c0d057acc3004f9b4322cf73d449 (diff)
downloadmana-client-c4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb.tar.gz
mana-client-c4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb.tar.bz2
mana-client-c4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb.tar.xz
mana-client-c4bdf324d7d464bc7fabbf88e1a6e66701c6e7cb.zip
Allow resizing of the game in windowed mode
Window positions are semi-smartly corrected as a result of the resize. Not supported when using OpenGL on Windows for now. Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/gui/widgets/window.h')
-rw-r--r--src/gui/widgets/window.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 64631287..945e3276 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -295,6 +295,13 @@ class Window : public gcn::Window, gcn::WidgetListener
virtual void resetToDefaultSize();
/**
+ * Adjusts the window position after the application window has been
+ * resized.
+ */
+ void adjustPositionAfterResize(int oldScreenWidth,
+ int oldScreenHeight);
+
+ /**
* Gets the layout handler for this window.
*/
Layout &getLayout();
@@ -352,11 +359,11 @@ class Window : public gcn::Window, gcn::WidgetListener
};
/**
- * Check if the window is off-screen and then move it to be visible
- * again. This is internally used by loadWindowState
- * and setVisible(true) members.
+ * Ensures the window is on the screen, moving it if necessary. This is
+ * used by loadWindowState and setVisible(true), and when the screen
+ * is resized.
*/
- void checkIfIsOffScreen(bool partially = true, bool entirely = true);
+ void ensureOnScreen();
/**
* Determines if the mouse is in a resize area and returns appropriate