From e6fe40e5b1eb5d573215572d14671c0c05786075 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Aug 2013 15:53:03 +0300 Subject: dont show input text in npc dialog if npc requested item. --- src/gui/npcdialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/npcdialog.cpp') 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(); } -- cgit v1.2.3-60-g2f50