summaryrefslogtreecommitdiff
path: root/src/gui/sell.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-31 03:07:31 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-01-31 03:07:31 +0000
commitefbf5fa72206086a7563ccfeddd601d324c7912f (patch)
tree20372135ab3fedd7db0a2370bcf985df7608f838 /src/gui/sell.h
parent2fb12d513bb7e10375893e1ae22da3538b20fa27 (diff)
downloadmana-efbf5fa72206086a7563ccfeddd601d324c7912f.tar.gz
mana-efbf5fa72206086a7563ccfeddd601d324c7912f.tar.bz2
mana-efbf5fa72206086a7563ccfeddd601d324c7912f.tar.xz
mana-efbf5fa72206086a7563ccfeddd601d324c7912f.zip
Created a ListModel for ShopItems.
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;