summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 23:47:02 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 23:47:02 +0100
commitfa2f3ac593a792c32095c2e885665ec91bb4019d (patch)
treef44aee845f0229dfcc6b2ad3c74613e0352f36c2 /src/gui/inventorywindow.cpp
parent07f7d52f661a74e6d0c780ca53e724651e3dcc48 (diff)
parent40edf4e91558cffd83d9015a2cf4a16360e27855 (diff)
downloadmana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.gz
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.bz2
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.tar.xz
mana-fa2f3ac593a792c32095c2e885665ec91bb4019d.zip
Merged with Aethyra master as of 2009-02-09
Conflicts: A lot of files...
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 3b868610..b9fe1c90 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -27,13 +27,11 @@
#include <guichan/widgets/label.hpp>
#include "button.h"
-#include "gui.h"
#include "inventorywindow.h"
#include "item_amount.h"
#include "itemcontainer.h"
#include "progressbar.h"
#include "scrollarea.h"
-#include "textbox.h"
#include "viewport.h"
#include "widgets/layout.h"
@@ -91,21 +89,33 @@ InventoryWindow::InventoryWindow(int invSize):
setMinHeight(130);
setMinWidth(mWeightLabel->getWidth() + mSlotsLabel->getWidth() + 310);
- place(0, 0, mInvenScroll, 7, 4);
- place(0, 4, mWeightLabel).setPadding(3);
- place(1, 4, mWeightBar, 2);
- place(3, 4, mSlotsLabel).setPadding(3);
- place(4, 4, mSlotsBar, 2);
+ place(0, 0, mWeightLabel).setPadding(3);
+ place(1, 0, mWeightBar, 2);
+ place(3, 0, mSlotsLabel).setPadding(3);
+ place(4, 0, mSlotsBar, 2);
+ place(0, 1, mInvenScroll, 7, 4);
place(5, 5, mDropButton);
place(6, 5, mUseButton);
Layout &layout = getLayout();
- layout.setRowHeight(0, Layout::AUTO_SET);
+ layout.setRowHeight(0, mDropButton->getHeight());
loadWindowState();
setLocationRelativeTo(getParent());
}
+InventoryWindow::~InventoryWindow()
+{
+ delete mWeightBar;
+ delete mSlotsBar;
+ delete mUseButton;
+ delete mDropButton;
+ delete mItems;
+ delete mWeightLabel;
+ delete mSlotsLabel;
+ delete mInvenScroll;
+}
+
void InventoryWindow::logic()
{
Window::logic();