summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-24 16:24:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-24 16:24:43 +0000
commitbfbb797e6c528e0650826e917d498c52362abbb0 (patch)
tree8d111b92eefe8451a66b57599217829b4127318e /src/gui/itemcontainer.cpp
parentdae5c721bf974792db526f1d736384d95a75635e (diff)
downloadmana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.gz
mana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.bz2
mana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.xz
mana-bfbb797e6c528e0650826e917d498c52362abbb0.zip
Merged 0.0 changes from revision 3177 to 3234 to trunk.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 308311b7..a176f226 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -35,7 +35,6 @@
#include "../resources/image.h"
#include "../resources/iteminfo.h"
#include "../resources/resourcemanager.h"
-#include "../resources/spriteset.h"
#include "../utils/tostring.h"
@@ -65,7 +64,8 @@ ItemContainer::logic()
int i = mInventory->getLastUsedSlot() + 1;
- if (i != mMaxItems) {
+ if (i != mMaxItems)
+ {
mMaxItems = i;
setWidth(getWidth());
}
@@ -192,9 +192,9 @@ ItemContainer::mousePressed(gcn::MouseEvent &event)
int my = event.getY();
int index = mx / gridWidth + ((my / gridHeight) * columns);
- if (index > INVENTORY_SIZE) {
+ if (index > INVENTORY_SIZE)
index = INVENTORY_SIZE - 1;
- }
+
setSelectedItem(mInventory->getItem(index));
}
}