summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventorywindow.h')
-rw-r--r--src/gui/inventorywindow.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 0dce0611..ebd2be22 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -23,11 +23,12 @@
#define INVENTORYWINDOW_H
#include "inventory.h"
+#include "eventlistener.h"
#include "gui/widgets/window.h"
+#include "gui/widgets/textfield.h"
#include "net/inventoryhandler.h"
-#include "net/net.h"
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
@@ -47,17 +48,12 @@ class InventoryWindow : public Window,
public gcn::ActionListener,
public gcn::KeyListener,
public gcn::SelectionListener,
- public InventoryListener
+ public InventoryListener,
+ public EventListener
{
public:
- /**
- * Constructor.
- */
InventoryWindow(Inventory *inventory);
- /**
- * Destructor.
- */
~InventoryWindow();
/**
@@ -106,33 +102,37 @@ class InventoryWindow : public Window,
*/
void updateButtons();
- /**
- * Updates the weight bar.
- */
- void updateWeight();
+ bool isInputFocused() const;
+
+ static bool isAnyInputFocused();
void slotsChanged(Inventory* inventory);
bool isMainInventory() { return mInventory->isMainInventory(); }
+ void event(Event::Channel channel, const Event &event);
+
+ private:
/**
- * Returns true if any instances exist.
+ * Updates the weight bar.
*/
- static bool isStorageActive() { return instances.size() > 1; }
+ void updateWeight();
+
- private:
typedef std::list<InventoryWindow*> WindowList;
static WindowList instances;
Inventory *mInventory;
ItemContainer *mItems;
+ TextField *mFilterText;
+
std::string mWeight, mSlots;
- gcn::Button *mUseButton, *mDropButton, *mSplitButton, *mOutfitButton,
- *mStoreButton, *mRetrieveButton;
+ gcn::Button *mUseButton, *mEquipButton, *mDropButton, *mSplitButton,
+ *mOutfitButton, *mStoreButton, *mRetrieveButton;
- gcn::Label *mWeightLabel, *mSlotsLabel;
+ gcn::Label *mWeightLabel, *mSlotsLabel, *mFilterLabel;
ProgressBar *mWeightBar, *mSlotsBar;