summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index f4d99cc79..2271a0bc7 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -66,6 +66,7 @@
#define CAPTION_SUBMIT _("Submit")
NpcDialog::DialogList NpcDialog::instances;
+NpcDialogs NpcDialog::mNpcDialogs;
typedef std::vector<Image *>::iterator ImageVectorIter;
@@ -774,3 +775,15 @@ void NpcDialog::clearRows()
{
mTextBox->clearRows();
}
+
+void NpcDialog::clearDialogs()
+{
+ NpcDialogs::iterator it = mNpcDialogs.begin();
+ const NpcDialogs::iterator it_end = mNpcDialogs.end();
+ while (it != it_end)
+ {
+ delete (*it).second;
+ ++ it;
+ }
+ mNpcDialogs.clear();
+}