summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.h
diff options
context:
space:
mode:
authorBlue Sans Douze <bluesansdouze@gmail.com>2011-03-26 13:44:08 +0100
committerBlue Sans Douze <bluesansdouze@gmail.com>2011-03-26 16:59:35 +0100
commitc176ecada07af6235d6b65b839018e4e0bf07298 (patch)
treed49fdaf009c52e163b783c22b2105cf794ece068 /src/gui/widgets/itemcontainer.h
parente35b3bdd0a74464e4b4d3b931ca416f0c7864ba6 (diff)
downloadmana-c176ecada07af6235d6b65b839018e4e0bf07298.tar.gz
mana-c176ecada07af6235d6b65b839018e4e0bf07298.tar.bz2
mana-c176ecada07af6235d6b65b839018e4e0bf07298.tar.xz
mana-c176ecada07af6235d6b65b839018e4e0bf07298.zip
Add search bar to storage and inventory windows
Reviewed-by: thorbjorn
Diffstat (limited to 'src/gui/widgets/itemcontainer.h')
-rw-r--r--src/gui/widgets/itemcontainer.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 38ccf9ca..89012a37 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -27,6 +27,7 @@
#include <guichan/widget.hpp>
#include <guichan/widgetlistener.hpp>
+#include <map>
#include <list>
class Image;
@@ -98,6 +99,12 @@ class ItemContainer : public gcn::Widget,
*/
void selectNone();
+
+ /**
+ * Sets item filter
+ */
+ void setFilter(const std::string &filter);
+
/**
* Adds a listener to the list that's notified each time a change to
* the selection occurs.
@@ -170,6 +177,8 @@ class ItemContainer : public gcn::Widget,
*/
int getSlotIndex(int x, int y) const;
+ Item *getItemAt(int) const;
+
Inventory *mInventory;
int mGridColumns, mGridRows;
Image *mSelImg;
@@ -181,6 +190,10 @@ class ItemContainer : public gcn::Widget,
bool mDescItems;
int mDragPosX, mDragPosY;
+ std::map<int, Item*> mFilteredMap;
+
+ std::string mFilter;
+
ItemPopup *mItemPopup;
typedef std::list<gcn::SelectionListener*> SelectionListenerList;