From 519c7cfaccac61beaa84751b7dfeed1c50600bed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Oct 2015 20:21:49 +0300 Subject: Not allow close skined npc menu by ok event. --- src/gui/windows/npcdialog.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index c32bd0f8f..9d96336b1 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -321,6 +321,8 @@ void NpcDialog::action(const ActionEvent &event) { case NPC_INPUT_LIST: { + if (!mSkinName.empty()) + return; if (gui) gui->resetClickCount(); const int selectedIndex = mItemList->getSelected(); @@ -570,17 +572,18 @@ void NpcDialog::action(const ActionEvent &event) { npcHandler->listInput(mNpcId, cnt + 1); printText = mItems[cnt]; + + if (mInputState != NPC_INPUT_ITEM && + mInputState != NPC_INPUT_ITEM_INDEX) + { + // addText will auto remove the input layout + addText(strprintf("> \"%s\"", printText.c_str()), false); + } + mNewText.clear(); break; } cnt ++; } - if (mInputState != NPC_INPUT_ITEM && - mInputState != NPC_INPUT_ITEM_INDEX) - { - // addText will auto remove the input layout - addText(strprintf("> \"%s\"", printText.c_str()), false); - } - mNewText.clear(); } } -- cgit v1.2.3-60-g2f50