diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-27 02:32:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-28 00:47:21 +0300 |
commit | c9bb66d595927bd14871c10b216ed05ffb5e3b12 (patch) | |
tree | aef6dc1911678dd813c64b3397ac13bbad7de622 /src/gui/npcdialog.h | |
parent | 54f3d4ce98b81a744ef6c0068100f4eb36a6528b (diff) | |
download | plus-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.gz plus-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.bz2 plus-c9bb66d595927bd14871c10b216ed05ffb5e3b12.tar.xz plus-c9bb66d595927bd14871c10b216ed05ffb5e3b12.zip |
Add support for images in npc menu.
Diffstat (limited to 'src/gui/npcdialog.h')
-rw-r--r-- | src/gui/npcdialog.h | 13 |
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 |