summaryrefslogtreecommitdiff
path: root/src/gui/status.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-05-05 20:33:58 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-05-05 20:33:58 +0000
commit84830f6365d73d0a0ee658ec43b666e0630690e1 (patch)
tree8722bcce8b62adf9a58410b1640c70d2aa636227 /src/gui/status.cpp
parent58db4a63659c7bb0ed8ac8bf5ab967bb3ff39def (diff)
downloadmana-client-84830f6365d73d0a0ee658ec43b666e0630690e1.tar.gz
mana-client-84830f6365d73d0a0ee658ec43b666e0630690e1.tar.bz2
mana-client-84830f6365d73d0a0ee658ec43b666e0630690e1.tar.xz
mana-client-84830f6365d73d0a0ee658ec43b666e0630690e1.zip
Status Window now have a button to show/hide Equipment Window.
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r--src/gui/status.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/status.cpp b/src/gui/status.cpp
index 675c5575..24a63499 100644
--- a/src/gui/status.cpp
+++ b/src/gui/status.cpp
@@ -55,6 +55,10 @@ StatusWindow::StatusWindow():
setupButton = new Button("Setup");
setupButton->setEventId("Setup");
setupButton->addActionListener(this);
+
+ equipmentButton = new Button("Equip.");
+ equipmentButton->setEventId("Equipment");
+ equipmentButton->addActionListener(this);
hp->setPosition(WIN_BORDER, WIN_BORDER);
sp->setPosition(WIN_BORDER, hp->getY() + hp->getHeight() + CONTROLS_SEPARATOR);
@@ -74,6 +78,7 @@ StatusWindow::StatusWindow():
skillsButton->setPosition(statsButton->getX() + statsButton->getWidth() + CONTROLS_SEPARATOR, statsButton->getY());
inventoryButton->setPosition(skillsButton->getX() + skillsButton->getWidth() + CONTROLS_SEPARATOR, statsButton->getY());
setupButton->setPosition(inventoryButton->getX() + inventoryButton->getWidth() + CONTROLS_SEPARATOR, statsButton->getY());
+ equipmentButton->setPosition(setupButton->getX() + setupButton->getWidth() + CONTROLS_SEPARATOR, statsButton->getY());
setContentSize(250, statsButton->getY() + statsButton->getHeight() + WIN_BORDER);
@@ -92,6 +97,7 @@ StatusWindow::StatusWindow():
add(skillsButton);
add(inventoryButton);
add(setupButton);
+ add(equipmentButton);
}
StatusWindow::~StatusWindow()
@@ -109,6 +115,7 @@ StatusWindow::~StatusWindow()
delete skillsButton;
delete inventoryButton;
delete setupButton;
+ delete equipmentButton;
}
void StatusWindow::update()
@@ -185,4 +192,8 @@ void StatusWindow::action(const std::string& eventId) {
// Show / Hide the inventory dialog
setupWindow->setVisible(true);
}
+ if (eventId == "Equipment") {
+ // Show / Hide the inventory dialog
+ equipmentWindow->setVisible(!equipmentWindow->isVisible());
+ }
}