summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-19 15:22:57 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-19 15:29:51 +0200
commite7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6 (patch)
treed2206a3544acfba5598df229b15e890b7450f1c8 /src/gui/itemcontainer.h
parent21d85f8726ad4a15702005247e5241a2056cbbc8 (diff)
downloadmana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.gz
mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.bz2
mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.tar.xz
mana-client-e7f9c983dd7a8d2aeb4b14e5621cef89ecc398f6.zip
Made ItemContainer wrap items depending on its width again
This is instead of taking a fixed number of rows and columns. The inventory and trade window are now resizable again. Other smaller changes: * Don't use bold font for the labels in the item container * Changed "(Eq)" back to "Eq." * Removed the ugly grid lines
Diffstat (limited to 'src/gui/itemcontainer.h')
-rw-r--r--src/gui/itemcontainer.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h
index ba834d01..bc7caf5d 100644
--- a/src/gui/itemcontainer.h
+++ b/src/gui/itemcontainer.h
@@ -25,6 +25,7 @@
#include <guichan/keylistener.hpp>
#include <guichan/mouselistener.hpp>
#include <guichan/widget.hpp>
+#include <guichan/widgetlistener.hpp>
#include <list>
@@ -44,7 +45,8 @@ namespace gcn {
*/
class ItemContainer : public gcn::Widget,
public gcn::KeyListener,
- public gcn::MouseListener
+ public gcn::MouseListener,
+ public gcn::WidgetListener
{
public:
/**
@@ -55,8 +57,7 @@ class ItemContainer : public gcn::Widget,
* @param gridRows Amount of rows in grid.
* @param offset Index offset
*/
- ItemContainer(Inventory *inventory, int gridColumns, int gridRows,
- bool forceQuantity = false);
+ ItemContainer(Inventory *inventory, bool forceQuantity = false);
/**
* Destructor.
@@ -68,15 +69,20 @@ class ItemContainer : public gcn::Widget,
*/
void draw(gcn::Graphics *graphics);
+ // KeyListener
void keyPressed(gcn::KeyEvent &event);
void keyReleased(gcn::KeyEvent &event);
+ // MouseListener
void mousePressed(gcn::MouseEvent &event);
void mouseDragged(gcn::MouseEvent &event);
void mouseReleased(gcn::MouseEvent &event);
void mouseMoved(gcn::MouseEvent &event);
void mouseExited(gcn::MouseEvent &event);
+ // WidgetListener
+ void widgetResized(const gcn::Event &event);
+
/**
* Returns the selected item.
*/