summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-28 19:05:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-28 19:05:52 +0300
commitb6eb53b9abdf48b88cb1978b9af97f2a879d2717 (patch)
tree5aad5623d352ec0b4aa245856958c61a384861c7 /src/gui/equipmentwindow.h
parent4d453108f45f9fb2ff4f5715cc1b3ddd63d36a80 (diff)
parent71fe51d38a406012e166589b7b720d83c1ab3ade (diff)
downloadplus-stripped1.1.11.27.tar.gz
plus-stripped1.1.11.27.tar.bz2
plus-stripped1.1.11.27.tar.xz
plus-stripped1.1.11.27.zip
Merge commit 'v1.1.11.27' into strippedstripped1.1.11.27
Conflicts: data/Makefile.am
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r--src/gui/equipmentwindow.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index cadf27620..0a3c2da20 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -25,27 +25,37 @@
#include "equipment.h"
#include "guichanfwd.h"
+#include "localconsts.h"
#include "gui/widgets/window.h"
#include "utils/xml.h"
+#include "resources/image.h"
+
#include <guichan/actionlistener.hpp>
#include <vector>
-#ifdef __GNUC__
-#define A_UNUSED __attribute__ ((unused))
-#else
-#define A_UNUSED
-#endif
-
class Being;
class Inventory;
+class Image;
+class ImageSet;
class Item;
class ItemPopup;
class PlayerBox;
+struct EquipmentBox
+{
+ EquipmentBox(int x0, int y0, Image *img) :
+ x(x0), y(y0), image(img)
+ { }
+
+ int x;
+ int y;
+ Image *image;
+};
+
/**
* Equipment dialog.
*
@@ -96,13 +106,13 @@ class EquipmentWindow : public Window, public gcn::ActionListener
void fillDefault();
- void addBox(int idx, int x, int y);
+ void addBox(int idx, int x, int y, int imageIndex);
void loadWindow(xmlNodePtr windowNode);
void loadPlayerBox(xmlNodePtr playerBoxNode);
- void loadSlot(xmlNodePtr slotNode);
+ void loadSlot(xmlNodePtr slotNode, ImageSet *imageset);
int parseSlotName(std::string name);
@@ -114,8 +124,9 @@ class EquipmentWindow : public Window, public gcn::ActionListener
int mSelected; /**< Index of selected item. */
bool mForing;
+ ImageSet *mImageSet;
Being *mBeing;
- std::vector<std::pair<int, int>*> mBoxes;
+ std::vector<EquipmentBox*> mBoxes;
gcn::Color mHighlightColor;
gcn::Color mBorderColor;
};