summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-25 22:50:59 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-25 22:50:59 +0100
commitcc79f0fe21e1a2ef73cbe987d54e848b9a47142d (patch)
treeedd316eb6094f0c02d6d014385865dcd88a2bc56 /src/gui/inventorywindow.cpp
parentb0df784f1be44a657ca8092069488602270629b7 (diff)
parent99e8a3fd77b63a029fe02dcf771b6af1aad252ed (diff)
downloadmana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.gz
mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.bz2
mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.tar.xz
mana-client-cc79f0fe21e1a2ef73cbe987d54e848b9a47142d.zip
Merge branch 'eathena/master'
Conflicts: A lot of files.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index d18490a4..0b554469 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -24,12 +24,11 @@
#include <guichan/font.hpp>
#include <guichan/mouseinput.hpp>
-#include <guichan/widgets/label.hpp>
-
#include "button.h"
#include "inventorywindow.h"
#include "item_amount.h"
#include "itemcontainer.h"
+#include "label.h"
#include "progressbar.h"
#include "scrollarea.h"
#include "sdlinput.h"
@@ -40,7 +39,6 @@
#include "../inventory.h"
#include "../item.h"
#include "../localplayer.h"
-#include "../log.h"
#include "../units.h"
#include "../resources/iteminfo.h"
@@ -63,7 +61,7 @@ InventoryWindow::InventoryWindow(int invSize):
setMinWidth(375);
setMinHeight(283);
// If you adjust these defaults, don't forget to adjust the trade window's.
- setDefaultSize(115, 30, 375, 283);
+ setDefaultSize(375, 300, ImageRect::CENTER);
addKeyListener(this);
std::string longestUseString = getFont()->getWidth(_("Equip")) >
@@ -96,8 +94,8 @@ InventoryWindow::InventoryWindow(int invSize):
mMaxWeight = -1;
mUsedSlots = toString(player_node->getInventory()->getNumberOfSlotsUsed());
- mSlotsLabel = new gcn::Label(_("Slots: "));
- mWeightLabel = new gcn::Label(_("Weight: "));
+ mSlotsLabel = new Label(_("Slots: "));
+ mWeightLabel = new Label(_("Weight: "));
mSlotsBar = new ProgressBar(1.0f, 100, 20, 225, 200, 25);
mWeightBar = new ProgressBar(1.0f, 100, 20, 0, 0, 255);
@@ -129,6 +127,9 @@ InventoryWindow::~InventoryWindow()
void InventoryWindow::logic()
{
+ if (!isVisible())
+ return;
+
Window::logic();
// It would be nicer if this update could be event based, needs some