forked from teamnwah/openmw-tes3coop
Merge remote branch 'scrawl/guifixes'
This commit is contained in:
commit
e89cf29994
2 changed files with 7 additions and 1 deletions
|
@ -708,6 +708,9 @@ void CharacterCreation::onGenerateClassDone(WindowBase* parWindow)
|
||||||
if (mGenerateClassResultDialog)
|
if (mGenerateClassResultDialog)
|
||||||
mWM->removeDialog(mGenerateClassResultDialog);
|
mWM->removeDialog(mGenerateClassResultDialog);
|
||||||
MWBase::Environment::get().getMechanicsManager()->setPlayerClass(mGenerateClass);
|
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)
|
if (mCreationStage == CSE_ReviewNext)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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