diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-09-29 19:46:12 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-09-29 19:46:12 +0000 |
commit | aac98cf8bcde36ba50ab45254866afc365a7908a (patch) | |
tree | 4e2ef7600f2ebd101484a305d3df6ca5135b39ef /src/gui/menuwindow.cpp | |
parent | c00d3acf930359740ae6125533b5233ae06b765e (diff) | |
download | mana-client-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.gz mana-client-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.bz2 mana-client-aac98cf8bcde36ba50ab45254866afc365a7908a.tar.xz mana-client-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/menuwindow.cpp')
-rw-r--r-- | src/gui/menuwindow.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index 13d95032..ea15fccf 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -32,13 +32,15 @@ #include "status.h" #include "skill.h" +#include "graphics.h" +extern Graphics *graphics; extern Window *setupWindow; - MenuWindow::MenuWindow(): Window("") { setResizable(false); + setWindowName("Menu"); setMovable(false); setTitleBarHeight(0); @@ -74,7 +76,10 @@ MenuWindow::MenuWindow(): setupButton->setPosition(skillsButton->getX() + skillsButton->getWidth() + 3, statusButton->getY()); add(setupButton); - setContentSize(setupButton->getX() + setupButton->getWidth(), setupButton->getY() + setupButton->getHeight()); + int menuWidth = setupButton->getX() + setupButton->getWidth(); + setDefaultSize((graphics->getWidth() - menuWidth - 5), 0, + menuWidth, + (setupButton->getY() + setupButton->getHeight())); } MenuWindow::~MenuWindow() |