diff options
author | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-08 09:35:21 +0000 |
---|---|---|
committer | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-08 09:35:21 +0000 |
commit | f80ff244eea2c3e6b37acf156f0d6933220d2cce (patch) | |
tree | b18ec0bdfde0f2a780942732032f17fc4cb08dda /src/gui/equipmentwindow.h | |
parent | c7ca39c9fc863fbd59f9e859cbcfc2a65188f6f2 (diff) | |
download | mana-f80ff244eea2c3e6b37acf156f0d6933220d2cce.tar.gz mana-f80ff244eea2c3e6b37acf156f0d6933220d2cce.tar.bz2 mana-f80ff244eea2c3e6b37acf156f0d6933220d2cce.tar.xz mana-f80ff244eea2c3e6b37acf156f0d6933220d2cce.zip |
Re-designed equipment window, un-equip created.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r-- | src/gui/equipmentwindow.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index 99a3cc60..e42e7b59 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -26,14 +26,28 @@ #include "window.h" +#include <guichan/actionlistener.hpp> + +#include "../equipment.h" + class Equipment; +class Image; + +/** + * Equipment box. + */ +struct EquipBox +{ + int posX; + int posY; +}; /** * Equipment dialog. * * \ingroup Interface */ -class EquipmentWindow : public Window +class EquipmentWindow : public Window, public gcn::ActionListener { public: /** @@ -51,10 +65,32 @@ class EquipmentWindow : public Window */ void draw(gcn::Graphics *graphics); + void action(const gcn::ActionEvent &event); + + void mousePressed(gcn::MouseEvent& mouseEvent); + + enum{ + // Equipment rules: + EQUIP_TORSO_SLOT = 0, + EQUIP_ARMS_SLOT = 1, + EQUIP_HEAD_SLOT = 2, + EQUIP_LEGS_SLOT = 3, + EQUIP_FEET_SLOT = 4, + EQUIP_RING1_SLOT = 5, + EQUIP_RING2_SLOT = 6, + EQUIP_NECKLACE_SLOT = 7, + EQUIP_FIGHT1_SLOT = 8, + EQUIP_FIGHT2_SLOT = 9, + EQUIP_PROJECTILE_SLOT = 10 + }; private: Equipment *mEquipment; -}; + gcn::Button *mUnequip; /**< Button for unequipping. */ + Image *mBackground; /**< Background Image. */ + EquipBox mEquipBox[EQUIPMENT_SIZE]; /**< Equipment Boxes. */ + int mSelected; /**< Index of selected item. */ +}; extern EquipmentWindow *equipmentWindow; #endif |