From 6a2b87e14a5ed565caf4f7e208c9c398d8a6611a Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 25 Mar 2013 17:37:59 +0100 Subject: [PATCH] Fix dialogue response coloring for creatures --- apps/openmw/mwgui/dialogue.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index d045725fb..bfbd60b07 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -389,10 +389,17 @@ std::string DialogueWindow::parseText(const std::string& text) std::vector topics; + bool hasSeparator = false; + for (unsigned int i=0; igetItemCount(); ++i) + { + if (mTopicsList->getItemNameAt(i) == "") + hasSeparator = true; + } + for(unsigned int i = 0;igetItemCount();i++) { std::string keyWord = mTopicsList->getItemNameAt(i); - if (separatorReached) + if (separatorReached || !hasSeparator) topics.push_back(keyWord); else if (keyWord == "") separatorReached = true;