summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-28 20:21:49 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-28 20:21:49 +0300
commit519c7cfaccac61beaa84751b7dfeed1c50600bed (patch)
treeb02d4d35b3975e09a17a886ddd9f3c283edd880d /src
parentb1b8f162f51976814fb87a3c36d10455185a0628 (diff)
downloadmv-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.gz
mv-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.bz2
mv-519c7cfaccac61beaa84751b7dfeed1c50600bed.tar.xz
mv-519c7cfaccac61beaa84751b7dfeed1c50600bed.zip
Not allow close skined npc menu by ok event.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/npcdialog.cpp17
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();
}
}