From 0aa01b93e298261ef6f4fbe8d459c2d6cd6ec4b8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 19 Jun 2012 15:24:52 +0200 Subject: [PATCH 1/2] don't put blue color on actions that are in the topic list, but are not topics (e.g. Barter) --- apps/openmw/mwgui/dialogue.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 79b2d68ba..55bd49beb 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -205,11 +205,14 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c 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;igetItemCount();i++) { std::string keyWord = topicsList->getItemNameAt(i); - if (keyWord != "") + if (separatorReached && keyWord != "") addColorInString(text,keyWord,"#686EBA","#B29154"); + else + separatorReached = true; } return text; } From ff278ab4ec2b1600966937f9c7de823afb8e3b77 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 19 Jun 2012 15:25:04 +0200 Subject: [PATCH 2/2] chargen generate class: fix result not being shown in review dialog --- apps/openmw/mwgui/charactercreation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwgui/charactercreation.cpp b/apps/openmw/mwgui/charactercreation.cpp index 3f9a94e2d..c39e305dc 100644 --- a/apps/openmw/mwgui/charactercreation.cpp +++ b/apps/openmw/mwgui/charactercreation.cpp @@ -708,6 +708,9 @@ void CharacterCreation::onGenerateClassDone(WindowBase* parWindow) if (mGenerateClassResultDialog) mWM->removeDialog(mGenerateClassResultDialog); MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass); + const ESM::Class *klass = MWBase::Environment::get().getWorld()->getStore().classes.find(mGenerateClass); + mPlayerClass = *klass; + mWM->setPlayerClass(mPlayerClass); if (mCreationStage == CSE_ReviewNext) {