mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 10:23:56 +00:00
don't put blue color on actions that are in the topic list, but are not topics (e.g. Barter)
This commit is contained in:
parent
9a6f012578
commit
0aa01b93e2
1 changed files with 4 additions and 1 deletions
|
@ -205,11 +205,14 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c
|
||||||
|
|
||||||
std::string DialogueWindow::parseText(std::string text)
|
std::string DialogueWindow::parseText(std::string text)
|
||||||
{
|
{
|
||||||
|
bool separatorReached = false; // only parse topics that are below the separator (this prevents actions like "Barter" that are not topics from getting blue-colored)
|
||||||
for(unsigned int i = 0;i<topicsList->getItemCount();i++)
|
for(unsigned int i = 0;i<topicsList->getItemCount();i++)
|
||||||
{
|
{
|
||||||
std::string keyWord = topicsList->getItemNameAt(i);
|
std::string keyWord = topicsList->getItemNameAt(i);
|
||||||
if (keyWord != "")
|
if (separatorReached && keyWord != "")
|
||||||
addColorInString(text,keyWord,"#686EBA","#B29154");
|
addColorInString(text,keyWord,"#686EBA","#B29154");
|
||||||
|
else
|
||||||
|
separatorReached = true;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue