summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-11 15:53:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-11 15:53:03 +0300
commite6fe40e5b1eb5d573215572d14671c0c05786075 (patch)
tree1610d973e01260410d5f611db904feb0de8df923 /src/gui/npcdialog.cpp
parentead6c86c13f17c15376e371c60248cdf8aa91b5b (diff)
downloadmanaplus-e6fe40e5b1eb5d573215572d14671c0c05786075.tar.gz
manaplus-e6fe40e5b1eb5d573215572d14671c0c05786075.tar.bz2
manaplus-e6fe40e5b1eb5d573215572d14671c0c05786075.tar.xz
manaplus-e6fe40e5b1eb5d573215572d14671c0c05786075.zip
dont show input text in npc dialog if npc requested item.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 3d8da6d58..29d6383f9 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -350,7 +350,6 @@ void NpcDialog::action(const gcn::ActionEvent &event)
const Item *const item = mInventory->getItem(0);
std::string str;
- int color = 1;
if (item)
{
str = strprintf("%d,%d", item->getId(),
@@ -370,8 +369,11 @@ void NpcDialog::action(const gcn::ActionEvent &event)
default:
break;
}
- // addText will auto remove the input layout
- addText(strprintf("> \"%s\"", printText.c_str()), false);
+ if (mInputState != NPC_INPUT_ITEM)
+ {
+ // addText will auto remove the input layout
+ addText(strprintf("> \"%s\"", printText.c_str()), false);
+ }
mNewText.clear();
}