summaryrefslogtreecommitdiff
path: root/src/gui/widgets/shortcutcontainer.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-01 21:37:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-01 22:58:18 +0300
commit70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1 (patch)
treefb619fed916b20de36ad97aa9c633110f8681193 /src/gui/widgets/shortcutcontainer.h
parent96007521ba20250db0ed05e4d6117077690637db (diff)
downloadmanaverse-70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1.tar.gz
manaverse-70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1.tar.bz2
manaverse-70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1.tar.xz
manaverse-70da0bae8b4f11bf4d2fcf12c2f1aa770fe1d4d1.zip
Add batch drawing to shortcuts windows.
Diffstat (limited to 'src/gui/widgets/shortcutcontainer.h')
-rw-r--r--src/gui/widgets/shortcutcontainer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 7cb51cbc5..568dc451b 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -30,6 +30,7 @@
#include <guichan/widgetlistener.hpp>
class Image;
+class ImageCollection;
/**
* A generic shortcut container.
@@ -66,6 +67,8 @@ class ShortcutContainer : public gcn::Widget,
*/
virtual void widgetResized(const gcn::Event &event) override;
+ virtual void widgetMoved(const gcn::Event& event) override;
+
/**
* Handles mouse when dragged.
*/
@@ -90,6 +93,11 @@ class ShortcutContainer : public gcn::Widget,
int getBoxHeight() const A_WARN_UNUSED
{ return mBoxHeight; }
+ void drawBackground(Graphics *g);
+
+ void setRedraw(bool b)
+ { mRedraw = true; }
+
protected:
/**
* Gets the index from the grid provided the point is in an item box.
@@ -109,6 +117,8 @@ class ShortcutContainer : public gcn::Widget,
int mBoxHeight;
int mCursorPosX, mCursorPosY;
int mGridWidth, mGridHeight;
+ ImageCollection *mVertexes;
+ bool mRedraw;
};
#endif