summaryrefslogtreecommitdiff
path: root/src/gui/windows/equipmentwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-28 18:30:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-28 23:26:40 +0300
commit18973230c163336944a7a0ecf466daa563cf8355 (patch)
tree4d3122a8caedcad815493012c0d2ba697be0f2ff /src/gui/windows/equipmentwindow.h
parent0278a66e30a3f2df0932ee501b5e5dc09b1a23ce (diff)
downloadmanaverse-18973230c163336944a7a0ecf466daa563cf8355.tar.gz
manaverse-18973230c163336944a7a0ecf466daa563cf8355.tar.bz2
manaverse-18973230c163336944a7a0ecf466daa563cf8355.tar.xz
manaverse-18973230c163336944a7a0ecf466daa563cf8355.zip
Add support for pages in equipment window.
Diffstat (limited to 'src/gui/windows/equipmentwindow.h')
-rw-r--r--src/gui/windows/equipmentwindow.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h
index 30fdcc366..628b2fdbe 100644
--- a/src/gui/windows/equipmentwindow.h
+++ b/src/gui/windows/equipmentwindow.h
@@ -26,6 +26,7 @@
#include "equipment.h"
#include "localconsts.h"
+#include "gui/widgets/equipmentpage.h"
#include "gui/widgets/window.h"
#include "utils/xml.h"
@@ -40,6 +41,7 @@ class Image;
class ImageSet;
class Item;
class PlayerBox;
+class TabStrip;
struct EquipmentBox;
@@ -102,14 +104,23 @@ class EquipmentWindow final : public Window,
void fillDefault();
+ void updatePage();
+
+ int addPage(const std::string &name);
+
+ void addDefaultPage();
+
void addBox(const int idx, int x, int y, const int imageIndex);
void loadWindow(const XmlNodePtrConst windowNode);
- void loadPlayerBox(const XmlNodePtr playerBoxNode);
+ void loadPage(const XmlNodePtr node);
+
+ void loadPlayerBox(const XmlNodePtr playerBoxNode, const int page);
void loadSlot(const XmlNodePtr slotNode,
- const ImageSet *const imageset);
+ const ImageSet *const imageset,
+ const int page);
static int parseSlotName(const std::string &name) A_WARN_UNUSED;
@@ -123,7 +134,8 @@ class EquipmentWindow final : public Window,
Image *mSlotBackground;
Image *mSlotHighlightedBackground;
ImageCollection *mVertexes;
- std::vector<EquipmentBox*> mBoxes;
+ std::vector<EquipmentPage*> mPages;
+ TabStrip *mTabs;
Color mHighlightColor;
Color mBorderColor;
Color mLabelsColor;
@@ -136,7 +148,10 @@ class EquipmentWindow final : public Window,
int mMinY;
int mMaxX;
int mMaxY;
+ int mYPadding;
+ int mSelectedTab;
bool mForing;
+ bool mHaveDefaultPage;
};
extern EquipmentWindow *equipmentWindow;