summaryrefslogtreecommitdiff
path: root/src/gui/sell.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-03 21:25:02 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-09-03 21:25:02 +0000
commit22aca668b53786dc00ff43764e61980e6499ec30 (patch)
tree9deb46fb98db77b556d579ce9eeaf4baa80a75e5 /src/gui/sell.h
parentfe3ecae6936b41045b405fb5055a9ad754ddec3b (diff)
downloadmana-22aca668b53786dc00ff43764e61980e6499ec30.tar.gz
mana-22aca668b53786dc00ff43764e61980e6499ec30.tar.bz2
mana-22aca668b53786dc00ff43764e61980e6499ec30.tar.xz
mana-22aca668b53786dc00ff43764e61980e6499ec30.zip
Fixed updating of labels in buy and sell dialogs. Also made our listbox respond
to mouse dragging to change the selection.
Diffstat (limited to 'src/gui/sell.h')
-rw-r--r--src/gui/sell.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/sell.h b/src/gui/sell.h
index 423fea26..12000bc3 100644
--- a/src/gui/sell.h
+++ b/src/gui/sell.h
@@ -27,20 +27,21 @@
#include <guichan/actionlistener.hpp>
#include "window.h"
+#include "selectionlistener.h"
#include "../guichanfwd.h"
class Item;
class Network;
class ShopItems;
-
+class ListBox;
/**
* The sell dialog.
*
* \ingroup Interface
*/
-class SellDialog : public Window, public gcn::ActionListener
+class SellDialog : public Window, gcn::ActionListener, SelectionListener
{
public:
/**
@@ -71,16 +72,18 @@ class SellDialog : public Window, public gcn::ActionListener
void action(const std::string& eventId, gcn::Widget* widget);
/**
- * Mouse callback
+ * Updates labels according to selected item.
+ *
+ * @see SelectionListener::selectionChanged
*/
- void mouseClick(int x, int y, int buton, int count);
+ void selectionChanged(const SelectionEvent &event);
private:
Network *mNetwork;
gcn::Button *mSellButton;
gcn::Button *mIncreaseButton;
gcn::Button *mDecreaseButton;
- gcn::ListBox *mItemList;
+ ListBox *mItemList;
gcn::Label *mMoneyLabel;
gcn::Label *mItemDescLabel;
gcn::Label *mItemEffectLabel;