From 2fb12d513bb7e10375893e1ae22da3538b20fa27 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Tue, 31 Jan 2006 02:59:23 +0000 Subject: Created a ListModel for ShopItems. --- src/gui/shop.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/gui/shop.h') 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 +#include + +#include struct ITEM_SHOP { std::string name; @@ -34,4 +37,23 @@ struct ITEM_SHOP { int quantity; }; +class ShopItems : public std::vector, 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 -- cgit v1.2.3-70-g09d2