summaryrefslogtreecommitdiff
path: root/src/inventory.h
diff options
context:
space:
mode:
authorNikos Giagtzoglou <gnikos21@yahoo.gr>2008-11-22 11:43:53 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-22 11:43:53 +0100
commit991389a535985af072f830b89e5113da82650fe5 (patch)
tree071ec4153b820a9c6404d5845443403b3cda83fb /src/inventory.h
parentc79d12b91ef0e49878a8e3f10486b910184acc69 (diff)
downloadmana-client-991389a535985af072f830b89e5113da82650fe5.tar.gz
mana-client-991389a535985af072f830b89e5113da82650fe5.tar.bz2
mana-client-991389a535985af072f830b89e5113da82650fe5.tar.xz
mana-client-991389a535985af072f830b89e5113da82650fe5.zip
Inventory window now displays amount of slots used
Patch by Nikos, with some improvements by vargavind.
Diffstat (limited to 'src/inventory.h')
-rw-r--r--src/inventory.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/inventory.h b/src/inventory.h
index aa5c8d1d..2fbbbf4c 100644
--- a/src/inventory.h
+++ b/src/inventory.h
@@ -80,7 +80,7 @@ class Inventory
/**
* Returns id of next free slot or -1 if all occupied.
*/
- int getFreeSlot();
+ int getFreeSlot() const;
/**
* Reset all item slots.
@@ -90,12 +90,17 @@ class Inventory
/**
* Get the number of slots filled with an item
*/
- int getNumberOfSlotsUsed();
+ int getNumberOfSlotsUsed() const;
/**
* Returns the index of the last occupied slot or 0 if none occupied.
*/
- int getLastUsedSlot();
+ int getLastUsedSlot() const;
+
+ /**
+ * Returns the number of slots available in the inventory.
+ */
+ int getInventorySize() const;
protected:
Item **mItems; /**< The holder of items */