summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/cutinwindow.cpp6
-rw-r--r--src/gui/windows/cutinwindow.h2
-rw-r--r--src/gui/windows/npcdialog.cpp11
3 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/windows/cutinwindow.cpp b/src/gui/windows/cutinwindow.cpp
index f8d21a37c..1a38661b8 100644
--- a/src/gui/windows/cutinwindow.cpp
+++ b/src/gui/windows/cutinwindow.cpp
@@ -139,6 +139,12 @@ void CutInWindow::show(const std::string &name,
}
}
+void CutInWindow::hide()
+{
+ delete2(mImage);
+ setVisible(Visible_false);
+}
+
void CutInWindow::logic()
{
if (mImage)
diff --git a/src/gui/windows/cutinwindow.h b/src/gui/windows/cutinwindow.h
index 7850c4e49..f6e48624c 100644
--- a/src/gui/windows/cutinwindow.h
+++ b/src/gui/windows/cutinwindow.h
@@ -47,6 +47,8 @@ class CutInWindow final : public Window
void show(const std::string &name,
const CutInT cutin);
+ void hide();
+
void logic() override final;
private:
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 585e8ab2f..dc991097b 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -39,6 +39,9 @@
#include "gui/popups/popupmenu.h"
+#ifdef EATHENA_SUPPORT
+#include "gui/windows/cutinwindow.h"
+#endif
#include "gui/windows/inventorywindow.h"
#include "gui/widgets/browserbox.h"
@@ -325,6 +328,10 @@ void NpcDialog::action(const ActionEvent &event)
else if (mActionState == NPC_ACTION_CLOSE
|| mActionState == NPC_ACTION_WAIT)
{
+#ifdef EATHENA_SUPPORT
+ if (cutInWindow)
+ cutInWindow->hide();
+#endif
closeDialog();
}
else if (mActionState == NPC_ACTION_INPUT)
@@ -601,6 +608,10 @@ void NpcDialog::action(const ActionEvent &event)
npcHandler->listInput(mNpcId, 255);
break;
}
+#ifdef EATHENA_SUPPORT
+ if (cutInWindow)
+ cutInWindow->hide();
+#endif
closeDialog();
}
}