summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-10 01:53:05 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-10 01:55:54 +0200
commit07e8a1b8408ed40cbf2031476627647057f62141 (patch)
tree688aa64341cb0dee0a5ea51acc16a28ddf3ea5c5 /src/gui/equipmentwindow.h
parentb4ebdcf0622ce297704887cf0d653079a1fbcf1e (diff)
downloadmana-07e8a1b8408ed40cbf2031476627647057f62141.tar.gz
mana-07e8a1b8408ed40cbf2031476627647057f62141.tar.bz2
mana-07e8a1b8408ed40cbf2031476627647057f62141.tar.xz
mana-07e8a1b8408ed40cbf2031476627647057f62141.zip
Some cleanup of the equipment window code
Also removed some unnecessary delete statements, since the Popup class already deletes its children and the ScrollArea already deletes its content.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r--src/gui/equipmentwindow.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index f5f9ee98..f6ba19f8 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -27,20 +27,9 @@
#include <guichan/actionlistener.hpp>
class Equipment;
-class Image;
class Inventory;
class Item;
class ItemPopup;
-class PlayerBox;
-
-/**
- * Equipment box.
- */
-struct EquipBox
-{
- int posX;
- int posY;
-};
/**
* Equipment dialog.
@@ -74,8 +63,8 @@ class EquipmentWindow : public Window, public gcn::ActionListener
void mousePressed(gcn::MouseEvent& mouseEvent);
#ifdef TMWSERV_SUPPORT
- enum{
- // Equipment rules:
+ enum EquipmentSlots
+ {
EQUIP_TORSO_SLOT = 0,
EQUIP_ARMS_SLOT = 1,
EQUIP_HEAD_SLOT = 2,
@@ -90,8 +79,8 @@ class EquipmentWindow : public Window, public gcn::ActionListener
EQUIP_VECTOREND
};
#else
- enum {
- // Equipment rules:
+ enum EquipmentSlots
+ {
EQUIP_LEGS_SLOT = 0,
EQUIP_FIGHT1_SLOT,
EQUIP_GLOVES_SLOT,
@@ -111,19 +100,26 @@ class EquipmentWindow : public Window, public gcn::ActionListener
void mouseExited(gcn::MouseEvent &event);
void mouseMoved(gcn::MouseEvent &event);
- Item* getItem(int x, int y) const;
+ Item *getItem(int x, int y) const;
Equipment *mEquipment;
#ifdef EATHENA_SUPPORT
Inventory *mInventory;
#endif
- gcn::Button *mUnequip; /**< Button for unequipping. */
+
+ /**
+ * Equipment box.
+ */
+ struct EquipBox
+ {
+ int posX;
+ int posY;
+ };
+
EquipBox mEquipBox[EQUIP_VECTOREND]; /**< Equipment Boxes. */
ItemPopup *mItemPopup;
- PlayerBox *mPlayerBox;
-
int mSelected; /**< Index of selected item. */
};