summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-16 23:18:55 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-16 23:18:55 +0000
commitdc53baaaf65943c6768e3ad209129609334133e8 (patch)
treecfd4ba52d94e2f2238195addaa53f80f4013f36a /src/gui/shoplistbox.h
parent35afca876ece89be5b282c73a200d0d3c5d27fe0 (diff)
downloadmana-client-dc53baaaf65943c6768e3ad209129609334133e8.tar.gz
mana-client-dc53baaaf65943c6768e3ad209129609334133e8.tar.bz2
mana-client-dc53baaaf65943c6768e3ad209129609334133e8.tar.xz
mana-client-dc53baaaf65943c6768e3ad209129609334133e8.zip
Subclassed ShopListBox from ListBox to get rid of some duplicated code, and
fixed a problem with scrolling to the current selection. Also aligned the text a bit better and put the price in parenthesis.
Diffstat (limited to 'src/gui/shoplistbox.h')
-rw-r--r--src/gui/shoplistbox.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/gui/shoplistbox.h b/src/gui/shoplistbox.h
index 2dff8977..476564b2 100644
--- a/src/gui/shoplistbox.h
+++ b/src/gui/shoplistbox.h
@@ -21,10 +21,10 @@
* $Id: listbox.h 2655 2006-09-03 21:25:02Z b_lindeijer $
*/
-#ifndef _TMW_LISTBOX_H
-#define _TMW_LISTBOX_H
+#ifndef _TMW_SHOPLISTBOX_H
+#define _TMW_SHOPLISTBOX_H
-#include <guichan/widgets/listbox.hpp>
+#include "listbox.h"
#include "shop.h"
class SelectionListener;
@@ -36,7 +36,7 @@ class SelectionListener;
*
* \ingroup GUI
*/
-class ShopListBox : public gcn::ListBox
+class ShopListBox : public ListBox
{
public:
/**
@@ -55,8 +55,6 @@ class ShopListBox : public gcn::ListBox
void draw(gcn::Graphics *graphics);
void mousePress(int x, int y, int button);
- void mouseRelease(int x, int y, int button);
- void mouseMotion(int x, int y);
/**
* Adds a listener to the list that's notified each time a change to
@@ -98,15 +96,6 @@ class ShopListBox : public gcn::ListBox
void setPriceCheck(bool check);
private:
- /**
- * Sends out selection events to the list of selection listeners.
- */
- void fireSelectionChangedEvent();
-
- bool mMousePressed; /**< Keeps track of mouse pressed status. */
-
- std::list<SelectionListener*> mListeners;
-
int mPlayerMoney;
/**
@@ -118,7 +107,6 @@ class ShopListBox : public gcn::ListBox
int mRowHeight; /**< Row Height */
bool mPriceCheck;
-
};
#endif