From 6a13899daed872debe2375c71903505e6434a731 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sat, 17 Jul 2010 21:01:26 -0400 Subject: Modify how attributes and stats are handled Handling moved from LocalPlayer to PlayerInfo class Event system used to update windows Reviewed-by: Jared Adams --- src/gui/inventorywindow.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/gui/inventorywindow.h') diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index f611e934..3adbc1cc 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -23,6 +23,7 @@ #define INVENTORYWINDOW_H #include "inventory.h" +#include "listener.h" #include "gui/widgets/window.h" @@ -47,7 +48,8 @@ class InventoryWindow : public Window, public gcn::ActionListener, public gcn::KeyListener, public gcn::SelectionListener, - public InventoryListener + public InventoryListener, + public Mana::Listener { public: /** @@ -100,11 +102,6 @@ class InventoryWindow : public Window, * window has been closed. */ void close(); - - /** - * Updates the weight bar. - */ - void updateWeight(); void slotsChanged(Inventory* inventory); @@ -115,7 +112,15 @@ class InventoryWindow : public Window, */ static bool isStorageActive() { return instances.size() > 1; } + void event(const std::string &channel, const Mana::Event &event); + private: + /** + * Updates the weight bar. + */ + void updateWeight(); + + typedef std::list WindowList; static WindowList instances; -- cgit v1.2.3-70-g09d2