summaryrefslogtreecommitdiff
path: root/src/gui/sell.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/sell.h')
-rw-r--r--src/gui/sell.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/gui/sell.h b/src/gui/sell.h
index 1a5fabf5..86caff55 100644
--- a/src/gui/sell.h
+++ b/src/gui/sell.h
@@ -24,10 +24,7 @@
#ifndef _TMW_SELL_H
#define _TMW_SELL_H
-#include <vector>
-
#include <guichan/actionlistener.hpp>
-#include <guichan/listmodel.hpp>
#include "window.h"
@@ -35,16 +32,15 @@
class Item;
class Network;
+class ShopItems;
-struct ITEM_SHOP;
/**
* The sell dialog.
*
* \ingroup Interface
*/
-class SellDialog : public Window, public gcn::ActionListener,
- public gcn::ListModel
+class SellDialog : public Window, public gcn::ActionListener
{
public:
/**
@@ -55,6 +51,11 @@ class SellDialog : public Window, public gcn::ActionListener,
SellDialog(Network *network);
/**
+ * Destructor
+ */
+ virtual ~SellDialog();
+
+ /**
* Resets the dialog, clearing inventory.
*/
void reset();
@@ -70,20 +71,10 @@ class SellDialog : public Window, public gcn::ActionListener,
void action(const std::string& eventId);
/**
- * Returns the number of items in the inventory.
- */
- int getNumberOfElements();
-
- /**
* Mouse callback
*/
void mouseClick(int x, int y, int buton, int count);
- /**
- * Returns the name of item number i in the inventory.
- */
- std::string getElementAt(int i);
-
private:
Network *mNetwork;
gcn::Button *sellButton;
@@ -98,7 +89,7 @@ class SellDialog : public Window, public gcn::ActionListener,
gcn::Label *quantityLabel;
gcn::Slider *slider;
- std::vector<ITEM_SHOP> shopInventory;
+ ShopItems *mShopItems;
int m_maxItems;
int m_amountItems;