summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
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/setup.cpp
parentc00d3acf930359740ae6125533b5233ae06b765e (diff)
downloadmana-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/setup.cpp')
-rw-r--r--src/gui/setup.cpp34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index b9702e04..0b4ef4fe 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -350,31 +350,13 @@ void Setup::action(const std::string &eventId)
}
else if (eventId == "winsToDefault")
{
- int screenW = graphics->getWidth();
- int screenH = graphics->getHeight();
-
- statusWindow->setWidth(365);
- statusWindow->setHeight(255);
- statusWindow->setPosition((screenW - statusWindow->getWidth()) / 2,
- (screenH - statusWindow->getHeight()) / 2);
-
- minimap->setPosition(3, 30);
-
- chatWindow->setWidth(600);
- chatWindow->setHeight(100);
- chatWindow->setPosition(0, screenH - chatWindow->getHeight());
- if (chatWindow->getContent() != NULL)
- {
- chatWindow->getContent()->setDimension(gcn::Rectangle(0,0,594,80));
- }
-
- inventoryWindow->setWidth(322);
- inventoryWindow->setHeight(172);
- inventoryWindow->setPosition(60, 5);
-
- equipmentWindow->setPosition(5,140);
-
- helpWindow->setPosition(100,100);
-
+ statusWindow->resetToDefaultSize();
+ minimap->resetToDefaultSize();
+ chatWindow->resetToDefaultSize();
+ inventoryWindow->resetToDefaultSize();
+ inventoryWindow->updateWidgets();
+ equipmentWindow->resetToDefaultSize();
+ helpWindow->resetToDefaultSize();
+ skillDialog->resetToDefaultSize();
}
}