From a885f8724005976b10daab53eeffd1ab04a67fc8 Mon Sep 17 00:00:00 2001 From: Blue Date: Sat, 9 May 2009 23:08:27 +0200 Subject: Client - Close button storage Window Adds a close button to the storage Window --- src/gui/storagewindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/storagewindow.cpp') 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) -- cgit v1.2.3-70-g09d2