summaryrefslogtreecommitdiff
path: root/src/gui/buy.h
diff options
context:
space:
mode:
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;