summaryrefslogtreecommitdiff
path: root/src/gui/buy.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/buy.h
parentfe3ecae6936b41045b405fb5055a9ad754ddec3b (diff)
downloadmana-client-22aca668b53786dc00ff43764e61980e6499ec30.tar.gz
mana-client-22aca668b53786dc00ff43764e61980e6499ec30.tar.bz2
mana-client-22aca668b53786dc00ff43764e61980e6499ec30.tar.xz
mana-client-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/buy.h')
-rw-r--r--src/gui/buy.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/buy.h b/src/gui/buy.h
index b09b648b..6a8d45e3 100644
--- a/src/gui/buy.h
+++ b/src/gui/buy.h
@@ -27,18 +27,20 @@
#include <guichan/actionlistener.hpp>
#include "window.h"
+#include "selectionlistener.h"
#include "../guichanfwd.h"
class Network;
class ShopItems;
+class ListBox;
/**
* The buy dialog.
*
* \ingroup Interface
*/
-class BuyDialog : public Window, public gcn::ActionListener
+class BuyDialog : public Window, public gcn::ActionListener, SelectionListener
{
public:
/**
@@ -79,9 +81,11 @@ class BuyDialog : public Window, public gcn::ActionListener
int getNumberOfElements();
/**
- * Mouse callback
+ * Updates the labels according to the selected item.
+ *
+ * @see SelectionListener::selectionChanged
*/
- void mouseClick(int x, int y, int buton, int count);
+ void selectionChanged(const SelectionEvent &event);
/**
* Returns the name of item number i in the shop inventory.
@@ -94,7 +98,7 @@ class BuyDialog : public Window, public gcn::ActionListener
gcn::Button *mQuitButton;
gcn::Button *mIncreaseButton;
gcn::Button *mDecreaseButton;
- gcn::ListBox *mItemList;
+ ListBox *mItemList;
gcn::ScrollArea *mScrollArea;
gcn::Label *mItemDescLabel;
gcn::Label *mItemEffectLabel;