diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.h | 2 | ||||
-rw-r--r-- | src/net/eathena/npchandler.cpp | 1 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index ba8754482..e8caa0722 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -184,6 +184,10 @@ NpcDialog::NpcDialog(const int npcId) : loadWindowState(); instances.push_back(this); +} + +void NpcDialog::postInit() +{ setVisible(true); requestFocus(); enableVisibleSound(true); diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h index f48e782d9..4e907e325 100644 --- a/src/gui/windows/npcdialog.h +++ b/src/gui/windows/npcdialog.h @@ -72,6 +72,8 @@ class NpcDialog final : public Window, ~NpcDialog(); + void postInit(); + /** * Called when receiving actions from the widgets. */ diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 8ca545adf..05d6bb0b1 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -222,6 +222,7 @@ int NpcHandler::getNpc(Net::MessageIn &msg, const bool haveLength) else { mDialog = new NpcDialog(npcId); + mDialog->postInit(); mDialog->saveCamera(); if (player_node) player_node->stopWalking(false); diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index d03cd4fb5..7dc926c73 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -235,6 +235,7 @@ int NpcHandler::getNpc(Net::MessageIn &msg, const bool haveLength) else { mDialog = new NpcDialog(npcId); + mDialog->postInit(); mDialog->saveCamera(); if (player_node) player_node->stopWalking(false); |