From 0601642d8b3aa2c7aa365e27aa3ef2459553c3fd Mon Sep 17 00:00:00 2001 From: Joshua Langley Date: Tue, 14 Aug 2007 05:59:52 +0000 Subject: mantis_id:129 - Inventory Window Slots Added. --- src/gui/inventorywindow.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src/gui/inventorywindow.h') diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index b153bb39..450d6565 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -25,6 +25,9 @@ #define _TMW_INVENTORYWINDOW_H #include +#include + +#include #include "window.h" #include "selectionlistener.h" @@ -39,7 +42,10 @@ class ItemContainer; * * \ingroup Interface */ -class InventoryWindow : public Window, gcn::ActionListener, SelectionListener +class InventoryWindow : public Window, + public gcn::ActionListener, + public gcn::KeyListener, + public SelectionListener { public: /** @@ -47,6 +53,11 @@ class InventoryWindow : public Window, gcn::ActionListener, SelectionListener */ InventoryWindow(); + /** + * Destructor. + */ + ~InventoryWindow(); + /** * Logic (updates buttons and weight information). */ @@ -57,8 +68,21 @@ class InventoryWindow : public Window, gcn::ActionListener, SelectionListener */ void action(const gcn::ActionEvent &event); + /** + * Handles the mouse clicks. + */ void mouseClicked(gcn::MouseEvent &event); + /** + * Handles the key presses. + */ + void keyPressed(gcn::KeyEvent &event); + + /** + * Handles the key releases. + */ + void keyReleased(gcn::KeyEvent &event); + Item* getItem(); /** @@ -75,8 +99,9 @@ class InventoryWindow : public Window, gcn::ActionListener, SelectionListener ItemContainer *mItems; - gcn::Button *mUseButton, *mDropButton; - gcn::ScrollArea *mInvenScroll; + gcn::Button *mUseButton, *mDropButton; /**< Use, Drop Item Buttons. */ + gcn::CheckBox *mSplitBox; /**< Split item checkbox. */ + gcn::ScrollArea *mInvenScroll; /**< Inventory Scroll Area. */ gcn::Label *mItemNameLabel; gcn::Label *mItemDescriptionLabel; gcn::Label *mItemEffectLabel; -- cgit v1.2.3-60-g2f50