summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-30 01:34:16 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 20:00:07 +0100
commit1b1050da1c7b84cc72b7efbb2229294975be9e10 (patch)
tree68d15ccb015d58aeb5797ffd06efca3e55997c24 /src/gui/equipmentwindow.h
parent0d4142a891cd228da24ee3aa3bbd7dc622da5b75 (diff)
parent955a7613d1fe116fe5e1da07a222b6849b3c885c (diff)
downloadmana-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.gz
mana-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.bz2
mana-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.xz
mana-1b1050da1c7b84cc72b7efbb2229294975be9e10.zip
Merged with Aethyra master as of 2009-01-27
Conflicts: Almost everywhere.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r--src/gui/equipmentwindow.h43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index e2420134..0b3aede0 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -22,17 +22,29 @@
#ifndef EQUIPMENTWINDOW_H
#define EQUIPMENTWINDOW_H
+#include <guichan/actionlistener.hpp>
+
#include "window.h"
-#include "../inventory.h"
class Equipment;
+class Inventory;
+class PlayerBox;
+
+/**
+ * Equipment box.
+ */
+struct EquipBox
+{
+ int posX;
+ int posY;
+};
/**
* Equipment dialog.
*
* \ingroup Interface
*/
-class EquipmentWindow : public Window
+class EquipmentWindow : public Window, public gcn::ActionListener
{
public:
/**
@@ -50,9 +62,36 @@ class EquipmentWindow : public Window
*/
void draw(gcn::Graphics *graphics);
+ void action(const gcn::ActionEvent &event);
+
+ void mousePressed(gcn::MouseEvent& mouseEvent);
+
+ enum {
+ // Equipment rules:
+ EQUIP_LEGS_SLOT = 0,
+ EQUIP_FIGHT1_SLOT,
+ EQUIP_GLOVES_SLOT,
+ EQUIP_RING2_SLOT,
+ EQUIP_RING1_SLOT,
+ EQUIP_FIGHT2_SLOT,
+ EQUIP_FEET_SLOT,
+ EQUIP_CAPE_SLOT,
+ EQUIP_HEAD_SLOT,
+ EQUIP_TORSO_SLOT,
+ EQUIP_AMMO_SLOT,
+ EQUIP_VECTOREND
+ };
+
+
private:
Equipment *mEquipment;
Inventory *mInventory;
+ gcn::Button *mUnequip; /**< Button for unequipping. */
+ EquipBox mEquipBox[EQUIP_VECTOREND]; /**< Equipment Boxes. */
+
+ PlayerBox *mPlayerBox;
+
+ int mSelected; /**< Index of selected item. */
};
extern EquipmentWindow *equipmentWindow;