summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
commit36d28236321b6a2824ad4f394faeabbf79626808 (patch)
tree7d2475acf84852f2a21cc29eecbf7524cd58ff52 /src/gui/inventorywindow.cpp
parentc9f930c759004e179545c3b82992e3f8a12345f2 (diff)
downloadmana-36d28236321b6a2824ad4f394faeabbf79626808.tar.gz
mana-36d28236321b6a2824ad4f394faeabbf79626808.tar.bz2
mana-36d28236321b6a2824ad4f394faeabbf79626808.tar.xz
mana-36d28236321b6a2824ad4f394faeabbf79626808.zip
Removed legacy inventory code. Added display of equipment.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 2018c75a..2ad35095 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -109,12 +109,7 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
if (event.getId() == "use") {
if (item->isEquipment()) {
- if (item->isEquipped()) {
- player_node->unequipItem(item);
- }
- else {
- player_node->equipItem(item);
- }
+ player_node->equipItem(item);
}
else {
player_node->useItem(item);
@@ -215,12 +210,7 @@ void InventoryWindow::updateButtons()
if ((item = mItems->getItem()) && item->isEquipment())
{
- if (item->isEquipped()) {
- mUseButton->setCaption("Unequip");
- }
- else {
- mUseButton->setCaption("Equip");
- }
+ mUseButton->setCaption("Equip");
}
else {
mUseButton ->setCaption("Use");