diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-28 20:21:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-28 20:21:49 +0300 |
commit | 519c7cfaccac61beaa84751b7dfeed1c50600bed (patch) | |
tree | b02d4d35b3975e09a17a886ddd9f3c283edd880d | |
parent | b1b8f162f51976814fb87a3c36d10455185a0628 (diff) | |
download | manaverse-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.gz manaverse-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.bz2 manaverse-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.xz manaverse-519c7cfaccac61beaa84751b7dfeed1c50600bed.zip |
Not allow close skined npc menu by ok event.
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 17 |
1 files 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(); } } |