diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-05-05 20:33:58 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-05-05 20:33:58 +0000 |
commit | 84830f6365d73d0a0ee658ec43b666e0630690e1 (patch) | |
tree | 8722bcce8b62adf9a58410b1640c70d2aa636227 /src/gui | |
parent | 58db4a63659c7bb0ed8ac8bf5ab967bb3ff39def (diff) | |
download | mana-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')
-rw-r--r-- | src/gui/status.cpp | 11 | ||||
-rw-r--r-- | src/gui/status.h | 2 |
2 files changed, 12 insertions, 1 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()); + } } diff --git a/src/gui/status.h b/src/gui/status.h index 17a472fe..4b485729 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -62,7 +62,7 @@ class StatusWindow : public Window, public gcn::ActionListener { gcn::Label *expLabel, *jobExpLabel; ProgressBar *healthBar, *manaBar; ProgressBar *xpBar, *jobXpBar; - gcn::Button *statsButton, *skillsButton, *inventoryButton, *setupButton; + gcn::Button *statsButton, *skillsButton, *inventoryButton, *setupButton, *equipmentButton; }; #endif |