summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-27 02:32:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-28 00:47:21 +0300
commitc9bb66d595927bd14871c10b216ed05ffb5e3b12 (patch)
treeaef6dc1911678dd813c64b3397ac13bbad7de622 /src/gui/npcdialog.h
parent54f3d4ce98b81a744ef6c0068100f4eb36a6528b (diff)
downloadmanaverse-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.gz
manaverse-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.bz2
manaverse-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.xz
manaverse-c9bb66d595927bd14871c10b216ed05ffb5e3b12.zip
Add support for images in npc menu.
Diffstat (limited to 'src/gui/npcdialog.h')
-rw-r--r--src/gui/npcdialog.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 75c55ae96..e3cc274c8 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -25,6 +25,7 @@
#include "configlistener.h"
+#include "gui/widgets/extendedlistmodel.h"
#include "gui/widgets/window.h"
#include "utils/stringvector.h"
@@ -38,7 +39,7 @@ class Being;
class BrowserBox;
class ItemLinkHandler;
class IntTextField;
-class ListBox;
+class ExtendedListBox;
class PlayerBox;
class TextBox;
class TextField;
@@ -55,7 +56,7 @@ namespace gcn
* \ingroup Interface
*/
class NpcDialog : public Window, public gcn::ActionListener,
- public gcn::ListModel, public ConfigListener
+ public ExtendedListModel, public ConfigListener
{
public:
/**
@@ -119,6 +120,11 @@ class NpcDialog : public Window, public gcn::ActionListener,
std::string getElementAt(int i);
/**
+ * Returns the image of item number i of the choices list.
+ */
+ const Image *getImageAt(int i);
+
+ /**
* Makes this dialog request a choice selection from the user.
*/
void choiceRequest();
@@ -222,9 +228,10 @@ class NpcDialog : public Window, public gcn::ActionListener,
std::string mNewText;
// Used for choice input
- ListBox *mItemList;
+ ExtendedListBox *mItemList;
gcn::ScrollArea *mListScrollArea;
StringVect mItems;
+ std::vector<Image *> mImages;
ItemLinkHandler *mItemLinkHandler;
// Used for string and integer input