summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-22 18:46:20 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-22 18:46:20 +0300
commitdbe4b0a70a8ccf4c3be329f168d4388ba4b029b5 (patch)
tree9f7e4bbda2b28fdbaa8c4f1720ad71c1a8833338 /src/gui/inventorywindow.cpp
parent7aa3784a5d62848af60aabc3f82b19fb068b9d79 (diff)
downloadmanaverse-dbe4b0a70a8ccf4c3be329f168d4388ba4b029b5.tar.gz
manaverse-dbe4b0a70a8ccf4c3be329f168d4388ba4b029b5.tar.bz2
manaverse-dbe4b0a70a8ccf4c3be329f168d4388ba4b029b5.tar.xz
manaverse-dbe4b0a70a8ccf4c3be329f168d4388ba4b029b5.zip
Add equipment button to inventory window.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index b2c92a32c..e4a318d69 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -31,6 +31,7 @@
#include "playerinfo.h"
#include "units.h"
+#include "gui/equipmentwindow.h"
#include "gui/gui.h"
#include "gui/itemamountwindow.h"
#include "gui/outfitwindow.h"
@@ -176,6 +177,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
mSplitButton = new Button(_("Split"), "split", this);
mOutfitButton = new Button(_("Outfits"), "outfit", this);
mShopButton = new Button(_("Shop"), "shop", this);
+ mEquipmentButton = new Button(_("Equipment"), "equipment", this);
mWeightLabel = new Label(_("Weight:"));
mWeightBar = new ProgressBar(0.0f, 100, 20, Theme::PROG_WEIGHT);
@@ -193,9 +195,10 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
place(0, 2, invenScroll, 11).setPadding(3);
place(0, 3, mUseButton);
place(1, 3, mDropButton);
- place(8, 3, mSplitButton);
- place(9, 3, mShopButton);
- place(10, 3, mOutfitButton);
+ place(8, 2, mSplitButton);
+ place(8, 3, mShopButton);
+ place(9, 3, mOutfitButton);
+ place(10, 3, mEquipmentButton);
updateWeight();
}
@@ -274,6 +277,15 @@ void InventoryWindow::action(const gcn::ActionEvent &event)
shopWindow->requestMoveToTop();
}
}
+ else if (event.getId() == "equipment")
+ {
+ if (equipmentWindow)
+ {
+ equipmentWindow->setVisible(!equipmentWindow->isVisible());
+ if (equipmentWindow->isVisible())
+ equipmentWindow->requestMoveToTop();
+ }
+ }
else if (event.getId() == "close")
{
close();