diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-30 01:34:16 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-09 20:00:07 +0100 |
commit | 1b1050da1c7b84cc72b7efbb2229294975be9e10 (patch) | |
tree | 68d15ccb015d58aeb5797ffd06efca3e55997c24 /src/gui/itemshortcutcontainer.h | |
parent | 0d4142a891cd228da24ee3aa3bbd7dc622da5b75 (diff) | |
parent | 955a7613d1fe116fe5e1da07a222b6849b3c885c (diff) | |
download | mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.gz mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.bz2 mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.tar.xz mana-client-1b1050da1c7b84cc72b7efbb2229294975be9e10.zip |
Merged with Aethyra master as of 2009-01-27
Conflicts:
Almost everywhere.
Diffstat (limited to 'src/gui/itemshortcutcontainer.h')
-rw-r--r-- | src/gui/itemshortcutcontainer.h | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/src/gui/itemshortcutcontainer.h b/src/gui/itemshortcutcontainer.h index cdaf6713..d6a04d7b 100644 --- a/src/gui/itemshortcutcontainer.h +++ b/src/gui/itemshortcutcontainer.h @@ -23,20 +23,21 @@ #define ITEMSHORTCUTCONTAINER_H #include <guichan/mouselistener.hpp> -#include <guichan/widget.hpp> -#include <guichan/widgetlistener.hpp> + +#include "shortcutcontainer.h" + +#include "../guichanfwd.h" class Image; class Item; +class ItemPopup; /** * An item shortcut container. Used to quickly use items. * * \ingroup GUI */ -class ItemShortcutContainer : public gcn::Widget, - public gcn::WidgetListener, - public gcn::MouseListener +class ItemShortcutContainer : public ShortcutContainer { public: /** @@ -60,12 +61,6 @@ class ItemShortcutContainer : public gcn::Widget, void draw(gcn::Graphics *graphics); /** - * Invoked when a widget changes its size. This is used to determine - * the new height of the container. - */ - void widgetResized(const gcn::Event &event); - - /** * Handles mouse when dragged. */ void mouseDragged(gcn::MouseEvent &event); @@ -80,34 +75,14 @@ class ItemShortcutContainer : public gcn::Widget, */ void mouseReleased(gcn::MouseEvent &event); - int getMaxItems() - { return mMaxItems; } - - int getBoxWidth() - { return mBoxWidth; } - - int getBoxHeight() - { return mBoxHeight; } - private: - /** - * Gets the index from the grid provided the point is in an item box. - * - * @param pointX X coordinate of the point. - * @param pointY Y coordinate of the point. - * @return index on success, -1 on failure. - */ - int getIndexFromGrid(int pointX, int pointY) const; - - Image *mBackgroundImg; + void mouseExited(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event); - int mMaxItems; - int mBoxWidth; - int mBoxHeight; - int mCursorPosX, mCursorPosY; - int mGridWidth, mGridHeight; bool mItemClicked; Item *mItemMoved; + + ItemPopup *mItemPopup; }; #endif |