summaryrefslogtreecommitdiff
path: root/src/gui/storagewindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/storagewindow.cpp')
-rw-r--r--src/gui/storagewindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp
index 076dfccf..efa2bdd4 100644
--- a/src/gui/storagewindow.cpp
+++ b/src/gui/storagewindow.cpp
@@ -64,11 +64,11 @@ StorageWindow::StorageWindow(int invSize):
mStoreButton = new Button(_("Store"), "store", this);
mRetrieveButton = new Button(_("Retrieve"), "retrieve", this);
- mItems = new ItemContainer(player_node->getStorage(), 10, 30, true);
+ mItems = new ItemContainer(player_node->getStorage(), true);
mItems->addSelectionListener(this);
- mInvenScroll = new ScrollArea(mItems);
- mInvenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ gcn::ScrollArea *invenScroll = new ScrollArea(mItems);
+ invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mUsedSlots = player_node->getStorage()->getNumberOfSlotsUsed();
@@ -83,7 +83,7 @@ StorageWindow::StorageWindow(int invSize):
place(0, 0, mSlotsLabel).setPadding(3);
place(1, 0, mSlotsBar, 3);
- place(0, 1, mInvenScroll, 4, 4);
+ place(0, 1, invenScroll, 4, 4);
place(2, 5, mStoreButton);
place(3, 5, mRetrieveButton);
@@ -95,7 +95,6 @@ StorageWindow::StorageWindow(int invSize):
StorageWindow::~StorageWindow()
{
- delete mItems;
}
void StorageWindow::logic()