diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-22 02:39:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-22 22:16:47 +0300 |
commit | ad0c5a085c3c6531db2a84a77d590311ed1d2d8f (patch) | |
tree | 6d9d53668eb26f6ae94126a80298d3791b0f8962 /src/gui/equipmentwindow.h | |
parent | c70f14d7dc7d2cde472deb3a7aca60a482b7eb17 (diff) | |
download | manaplus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.gz manaplus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.bz2 manaplus-ad0c5a085c3c6531db2a84a77d590311ed1d2d8f.tar.xz manaplus-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.h | 10 |
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; |