diff options
author | Blue <bluesansdouze@gmail.com> | 2009-05-09 23:08:27 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-05-10 15:47:48 +0200 |
commit | a885f8724005976b10daab53eeffd1ab04a67fc8 (patch) | |
tree | a9eac1eb69e659f3b90d8d2eb499b1c850178290 /src | |
parent | f0443b76844ffc1b9b49eb5c921e85ded3eb99da (diff) | |
download | mana-client-a885f8724005976b10daab53eeffd1ab04a67fc8.tar.gz mana-client-a885f8724005976b10daab53eeffd1ab04a67fc8.tar.bz2 mana-client-a885f8724005976b10daab53eeffd1ab04a67fc8.tar.xz mana-client-a885f8724005976b10daab53eeffd1ab04a67fc8.zip |
Client - Close button storage Window
Adds a close button to the storage Window
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/storagewindow.cpp | 7 | ||||
-rw-r--r-- | src/gui/storagewindow.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp index 4804bdcb..535d68b7 100644 --- a/src/gui/storagewindow.cpp +++ b/src/gui/storagewindow.cpp @@ -65,6 +65,8 @@ StorageWindow::StorageWindow(int invSize): mStoreButton = new Button(_("Store"), "store", this); mRetrieveButton = new Button(_("Retrieve"), "retrieve", this); + mCloseButton = new Button(_("Close"), "close", this); + mItems = new ItemContainer(player_node->getStorage(), true); mItems->addSelectionListener(this); @@ -85,6 +87,7 @@ StorageWindow::StorageWindow(int invSize): place(0, 0, mSlotsLabel).setPadding(3); place(1, 0, mSlotsBar, 3); place(0, 1, invenScroll, 4, 4); + place(0, 5, mCloseButton); place(2, 5, mStoreButton); place(3, 5, mRetrieveButton); @@ -140,6 +143,10 @@ void StorageWindow::action(const gcn::ActionEvent &event) ItemAmountWindow::showWindow(ItemAmountWindow::StoreRemove, this, item); } + else if (event.getId() == "close") + { + close(); + } } void StorageWindow::mouseClicked(gcn::MouseEvent &event) diff --git a/src/gui/storagewindow.h b/src/gui/storagewindow.h index 4ccf324c..452ce735 100644 --- a/src/gui/storagewindow.h +++ b/src/gui/storagewindow.h @@ -91,7 +91,7 @@ class StorageWindow : public Window, gcn::ActionListener, int mSlots; int mUsedSlots; - gcn::Button *mStoreButton, *mRetrieveButton; + gcn::Button *mStoreButton, *mRetrieveButton, *mCloseButton; gcn::Label *mSlotsLabel; |