diff options
Diffstat (limited to 'src/gui/inventorywindow.h')
-rw-r--r-- | src/gui/inventorywindow.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 0dce0611..0ddd13f7 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -23,11 +23,11 @@ #define INVENTORYWINDOW_H #include "inventory.h" +#include "listener.h" #include "gui/widgets/window.h" #include "net/inventoryhandler.h" -#include "net/net.h" #include <guichan/actionlistener.hpp> #include <guichan/keylistener.hpp> @@ -47,7 +47,8 @@ class InventoryWindow : public Window, public gcn::ActionListener, public gcn::KeyListener, public gcn::SelectionListener, - public InventoryListener + public InventoryListener, + public Mana::Listener { public: /** @@ -106,21 +107,19 @@ class InventoryWindow : public Window, */ void updateButtons(); - /** - * Updates the weight bar. - */ - void updateWeight(); - void slotsChanged(Inventory* inventory); bool isMainInventory() { return mInventory->isMainInventory(); } + void event(Channels channel, const Mana::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; @@ -129,8 +128,8 @@ class InventoryWindow : public Window, 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; |