summaryrefslogtreecommitdiff
path: root/src/gui/window.h
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-09-29 19:46:12 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-09-29 19:46:12 +0000
commitaac98cf8bcde36ba50ab45254866afc365a7908a (patch)
tree4e2ef7600f2ebd101484a305d3df6ca5135b39ef /src/gui/window.h
parentc00d3acf930359740ae6125533b5233ae06b765e (diff)
downloadmana-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.gz
mana-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.bz2
mana-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.xz
mana-aac98cf8bcde36ba50ab45254866afc365a7908a.zip
Improved a lot windows reset to default size and pos. Also corrected a few the default win position. And moved the setposition from game to each win, to clarify the code.
Diffstat (limited to 'src/gui/window.h')
-rw-r--r--src/gui/window.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/window.h b/src/gui/window.h
index 05d9291b..a48d3851 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -179,6 +179,18 @@ class Window : public gcn::Window
*/
void loadWindowState();
+ /**
+ * Set the default win pos and size.
+ * (which can be different of the actual ones.)
+ */
+ void setDefaultSize(int defaultX, int defaultY,
+ int defaultWidth, int defaultHeight);
+
+ /**
+ * Reset the win pos and size to default.
+ * Don't forget to set defaults first.
+ */
+ void resetToDefaultSize();
protected:
gcn::Container *chrome; /**< Contained container */
@@ -195,6 +207,8 @@ class Window : public gcn::Window
int minWinHeight; /**< Minimum window height */
int maxWinWidth; /**< Maximum window width */
int maxWinHeight; /**< Maximum window height */
+ int defaultX, defaultY; /**< Default Win Pos and size */
+ int defaultWidth, defaultHeight;
/** The window container windows add themselves to. */
static WindowContainer* windowContainer;