diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-21 21:56:12 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-21 21:56:12 +0000 |
commit | 823aa330987205b251d9f662cfdd4c39149c6ec7 (patch) | |
tree | 55e78b4621bfc867b5ff1ecee101d46a6d7169e2 /src/gui/itemcontainer.cpp | |
parent | 9d51b2e1077042ae42d42a0e6314e439c62e2925 (diff) | |
download | mana-823aa330987205b251d9f662cfdd4c39149c6ec7.tar.gz mana-823aa330987205b251d9f662cfdd4c39149c6ec7.tar.bz2 mana-823aa330987205b251d9f662cfdd4c39149c6ec7.tar.xz mana-823aa330987205b251d9f662cfdd4c39149c6ec7.zip |
Renamed Spriteset to ImageSet.
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 055a07cb..334770f8 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; // Count from 0, usage from 2 - if (i != mMaxItems) { + if (i != mMaxItems) + { mMaxItems = i; setWidth(getWidth()); } @@ -197,9 +197,9 @@ ItemContainer::mousePressed(gcn::MouseEvent &event) int my = event.getY(); int index = mx / gridWidth + ((my / gridHeight) * columns) + 2; - if (index > INVENTORY_SIZE) { + if (index > INVENTORY_SIZE) index = INVENTORY_SIZE - 1; - } + setSelectedItem(mInventory->getItem(index)); } } |