diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-02-06 14:37:26 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-02-06 14:37:26 +0000 |
commit | 1d6113f5306923c162a5d770ba268103a732e06b (patch) | |
tree | 3e285265256592f5af8329855543a17295f4d8f7 /src/gui/inventory.h | |
parent | ed0422126771d22e08cf071c735878095a81eef9 (diff) | |
download | mana-1d6113f5306923c162a5d770ba268103a732e06b.tar.gz mana-1d6113f5306923c162a5d770ba268103a732e06b.tar.bz2 mana-1d6113f5306923c162a5d770ba268103a732e06b.tar.xz mana-1d6113f5306923c162a5d770ba268103a732e06b.zip |
Completed inventory fix, now selection works
Diffstat (limited to 'src/gui/inventory.h')
-rw-r--r-- | src/gui/inventory.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/gui/inventory.h b/src/gui/inventory.h index 4248bfdb..e48d5477 100644 --- a/src/gui/inventory.h +++ b/src/gui/inventory.h @@ -27,17 +27,10 @@ #include "../log.h" #include "../net/network.h" #include "../graphic/spriteset.h" +#include "itemcontainer.h" #include "gui.h" #include "window.h" -#define INVENTORY_SIZE 12 - -struct ITEM_HOLDER { // the holder of a item - int id; // the id of the item - int quantity; // number of items - //int index; // item position -}; - /** * Inventory dialog. * @@ -85,20 +78,13 @@ class InventoryWindow : public Window, gcn::ActionListener { */ void action(const std::string& eventId); - /** - * Handles mouse events - */ - void mousePress(int mx, int my, int button); - - ITEM_HOLDER items[INVENTORY_SIZE]; /**< this is the holder of items */ - + ItemContainer *items; + private: gcn::Button *useButton, *dropButton; int useItem(int index, int id); int dropItem(int index, int amunt); - Spriteset *itemset; - int selectedItem; }; #endif |