summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-22 02:39:05 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-22 22:16:47 +0300
commitad0c5a085c3c6531db2a84a77d590311ed1d2d8f (patch)
tree6d9d53668eb26f6ae94126a80298d3791b0f8962 /src/gui/equipmentwindow.h
parentc70f14d7dc7d2cde472deb3a7aca60a482b7eb17 (diff)
downloadplus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.gz
plus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.bz2
plus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.xz
plus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.zip
Add auto resize feature to equipment window for correct placing slots.
Diffstat (limited to 'src/gui/equipmentwindow.h')
-rw-r--r--src/gui/equipmentwindow.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index cb6d5c087..c8cc36fbd 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -101,6 +101,8 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
void mouseMoved(gcn::MouseEvent &event) override;
+ void recalcSize();
+
private:
Item *getItem(const int x, const int y) const;
@@ -110,8 +112,7 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
void fillDefault();
- void addBox(const int idx, const int x, const int y,
- const int imageIndex);
+ void addBox(const int idx, int x, int y, const int imageIndex);
void loadWindow(const XmlNodePtr windowNode);
@@ -140,6 +141,11 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
Image *mSlotHighlightedBackground;
int mItemPadding;
int mBoxSize;
+ int mButtonPadding;
+ int mMinX;
+ int mMinY;
+ int mMaxX;
+ int mMaxY;
};
extern EquipmentWindow *equipmentWindow;