diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-01-25 22:25:29 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-01-25 22:25:29 +0000 |
commit | add62901031e1c981d98779536a0ad16ceddf897 (patch) | |
tree | 809727a877a6646c6650f28d4df9655282488d1d /src/gui/status.cpp | |
parent | eb20715f6788956392cb89f94211b5f502237dd0 (diff) | |
download | mana-client-add62901031e1c981d98779536a0ad16ceddf897.tar.gz mana-client-add62901031e1c981d98779536a0ad16ceddf897.tar.bz2 mana-client-add62901031e1c981d98779536a0ad16ceddf897.tar.xz mana-client-add62901031e1c981d98779536a0ad16ceddf897.zip |
*** empty log message ***
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r-- | src/gui/status.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 40b7d8c4..e5482f09 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -40,8 +40,16 @@ StatusWindow::StatusWindow(): jobExpLabel = new gcn::Label("Job"); statsButton = new Button("Stats"); + statsButton->setEventId("Stats"); + statsButton->addActionListener(this); + skillsButton = new Button("Skills"); + skillsButton->setEventId("Skills"); + skillsButton->addActionListener(this); + inventoryButton = new Button("Inventory"); + inventoryButton->setEventId("Inventory"); + inventoryButton->addActionListener(this); hp->setPosition(WIN_BORDER, WIN_BORDER); sp->setPosition(WIN_BORDER, hp->getY() + hp->getHeight() + CONTROLS_SEPARATOR); @@ -150,3 +158,19 @@ void StatusWindow::update() delete[] tempstr; } + +void StatusWindow::action(const std::string& eventId) { + + if (eventId == "Stats") { + // Show / Hide the stats dialog + statsWindow->setVisible(!statsWindow->isVisible()); + } + if (eventId == "Skills") { + // Show / Hide the skills dialog + skillDialog->setVisible(!skillDialog->isVisible()); + } + if (eventId == "Inventory") { + // Show / Hide the inventory dialog + inventoryWindow->setVisible(!inventoryWindow->isVisible()); + } +} |