From d074efe8597cbc21375c59d7e6ee17296b4c4899 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 16 Jul 2011 00:15:26 +0300 Subject: Highlight first item in npc dialog. --- src/gui/npcdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui') diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index e8ea3388f..36677446d 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -333,6 +333,11 @@ void NpcDialog::parseListItems(const std::string &itemString) std::string tmp; while (getline(iss, tmp, ':')) mItems.push_back(tmp); + + if (!mItems.empty()) + mItemList->setSelected(0); + else + mItemList->setSelected(-1); } void NpcDialog::textRequest(const std::string &defaultText) -- cgit v1.2.3-70-g09d2