diff options
Diffstat (limited to 'src/gui/npcdialog.h')
-rw-r--r-- | src/gui/npcdialog.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index 337da6f2..d0131d0e 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -22,8 +22,7 @@ #ifndef NPCDIALOG_H #define NPCDIALOG_H -#include "configlistener.h" -#include "npc.h" +#include "listener.h" #include "gui/widgets/window.h" @@ -46,7 +45,7 @@ class Button; * \ingroup Interface */ class NpcDialog : public Window, public gcn::ActionListener, - public gcn::ListModel, public ConfigListener + public gcn::ListModel, public Mana::Listener { public: /** @@ -120,13 +119,6 @@ class NpcDialog : public Window, public gcn::ActionListener, void addChoice(const std::string &); /** - * Fills the options list for an NPC dialog. - * - * @param itemString A string with the options separated with colons. - */ - void parseListItems(const std::string &itemString); - - /** * Requests a text string from the user. */ void textRequest(const std::string &defaultText = ""); @@ -140,8 +132,7 @@ class NpcDialog : public Window, public gcn::ActionListener, /** * Requests a interger from the user. */ - void integerRequest(int defaultValue = 0, int min = 0, - int max = 2147483647); + void integerRequest(int defaultValue, int min, int max); void move(int amount); @@ -154,12 +145,7 @@ class NpcDialog : public Window, public gcn::ActionListener, void setVisible(bool visible); - void optionChanged(const std::string &name); - - /** - * Returns true if any instances exist. - */ - static bool isActive() { return instances.size() > 0; } + void event(Channels channel, const Mana::Event &event); /** * Returns the first active instance. Useful for pushing user @@ -172,6 +158,8 @@ class NpcDialog : public Window, public gcn::ActionListener, */ static void closeAll(); + static void setup(); + private: typedef std::list<NpcDialog*> DialogList; static DialogList instances; |