summaryrefslogtreecommitdiff
path: root/src/gui/storagewindow.cpp
diff options
context:
space:
mode:
authorBlue <bluesansdouze@gmail.com>2009-05-09 23:08:27 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-10 15:47:48 +0200
commita885f8724005976b10daab53eeffd1ab04a67fc8 (patch)
treea9eac1eb69e659f3b90d8d2eb499b1c850178290 /src/gui/storagewindow.cpp
parentf0443b76844ffc1b9b49eb5c921e85ded3eb99da (diff)
downloadmana-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/gui/storagewindow.cpp')
-rw-r--r--src/gui/storagewindow.cpp7
1 files changed, 7 insertions, 0 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)