summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-06 14:32:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-06 14:32:35 +0300
commitce14a018a6f66aa1309ebe71a8217082d83cd0da (patch)
tree05d4268533abc06f7f7d4459a82d69dcea8ae2f7 /src
parentf90aae8a2b49b87bd6bf66055a404914df3a0d05 (diff)
downloadmv-ce14a018a6f66aa1309ebe71a8217082d83cd0da.tar.gz
mv-ce14a018a6f66aa1309ebe71a8217082d83cd0da.tar.bz2
mv-ce14a018a6f66aa1309ebe71a8217082d83cd0da.tar.xz
mv-ce14a018a6f66aa1309ebe71a8217082d83cd0da.zip
Hide cutin if npc window closed.
Diffstat (limited to 'src')
-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();
}
}