summaryrefslogtreecommitdiff
path: root/src/gui/skill.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/skill.cpp
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/skill.cpp')
-rw-r--r--src/gui/skill.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 2e9b91a5..d9c224be 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -34,6 +34,9 @@
#include "../net/messageout.h"
#include "../net/protocol.h"
+#include "graphics.h"
+extern Graphics *graphics;
+
char *skill_db[] = {
// 0-99
"", "Basic", "Sword", "Two hand", "HP regeneration", "Bash", "Provoke", "Magnum", "Endure", "MP regeneration",
@@ -65,6 +68,7 @@ SkillDialog::SkillDialog():
skillPoints(0)
{
setWindowName("Skills");
+ setDefaultSize(graphics->getWidth() - 255, 25, 240, 240);
skillListBox = new ListBox(this);
skillScrollArea = new ScrollArea(skillListBox);
@@ -79,7 +83,6 @@ SkillDialog::SkillDialog():
useButton->setEventId("use");
closeButton->setEventId("close");
- setContentSize(240, 240);
skillScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
skillScrollArea->setDimension(gcn::Rectangle(5, 5, 230, 180));
pointsLabel->setDimension(gcn::Rectangle(8, 190, 200, 16));
@@ -102,6 +105,7 @@ SkillDialog::SkillDialog():
closeButton->addActionListener(this);
setLocationRelativeTo(getParent());
+ loadWindowState();
}
SkillDialog::~SkillDialog()