diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-31 02:59:23 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-31 02:59:23 +0000 |
commit | 2fb12d513bb7e10375893e1ae22da3538b20fa27 (patch) | |
tree | 8e4d43ccc427043762575b89a761341fff642adb /src/gui/shop.h | |
parent | 1764f1c1dfdc99504029a6f3275321bf31eabea4 (diff) | |
download | mana-2fb12d513bb7e10375893e1ae22da3538b20fa27.tar.gz mana-2fb12d513bb7e10375893e1ae22da3538b20fa27.tar.bz2 mana-2fb12d513bb7e10375893e1ae22da3538b20fa27.tar.xz mana-2fb12d513bb7e10375893e1ae22da3538b20fa27.zip |
Created a ListModel for ShopItems.
Diffstat (limited to 'src/gui/shop.h')
-rw-r--r-- | src/gui/shop.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/shop.h b/src/gui/shop.h index e256f869..fb1f33fd 100644 --- a/src/gui/shop.h +++ b/src/gui/shop.h @@ -25,6 +25,9 @@ #define _SHOP_H #include <string> +#include <vector> + +#include <guichan/listmodel.hpp> struct ITEM_SHOP { std::string name; @@ -34,4 +37,23 @@ struct ITEM_SHOP { int quantity; }; +class ShopItems : public std::vector<ITEM_SHOP>, public gcn::ListModel +{ + public: + /** + * Destructor + */ + virtual ~ShopItems() {}; + + /** + * Returns the number of items in the shop. + */ + int getNumberOfElements(); + + /** + * Returns the name of item number i in the shop. + */ + std::string getElementAt(int i); +}; + #endif |