diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-19 15:22:57 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-19 15:29:51 +0200 |
commit | e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6 (patch) | |
tree | d2206a3544acfba5598df229b15e890b7450f1c8 /src/gui/storagewindow.cpp | |
parent | 21d85f8726ad4a15702005247e5241a2056cbbc8 (diff) | |
download | mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.gz mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.bz2 mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.xz mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.zip |
Made ItemContainer wrap items depending on its width again
This is instead of taking a fixed number of rows and columns. The
inventory and trade window are now resizable again.
Other smaller changes:
* Don't use bold font for the labels in the item container
* Changed "(Eq)" back to "Eq."
* Removed the ugly grid lines
Diffstat (limited to 'src/gui/storagewindow.cpp')
-rw-r--r-- | src/gui/storagewindow.cpp | 9 |
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() |