summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-14 04:44:27 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-14 21:11:03 +0300
commitd5893e9326a529bcba55185024a9373a8d4096ba (patch)
tree58c04577844a00a19463ed0dfd6f1a692dff81be /src/gui/equipmentwindow.h
parentaad864d74e74e89e9d8ec11774d115046a3668cb (diff)
downloadmv-d5893e9326a529bcba55185024a9373a8d4096ba.tar.gz
mv-d5893e9326a529bcba55185024a9373a8d4096ba.tar.bz2
mv-d5893e9326a529bcba55185024a9373a8d4096ba.tar.xz
mv-d5893e9326a529bcba55185024a9373a8d4096ba.zip
Add equipment window background images.
Based on images from mana client.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r--src/gui/equipmentwindow.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index cadf27620..b7d71d49f 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -25,11 +25,14 @@
#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>
@@ -42,10 +45,23 @@
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 +112,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 +130,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;
};