forked from mirror/openmw-tes3mp
Merge branch 'DialogueSystem' of github.com:scrawl/openmw into DialogueSystem
This commit is contained in:
commit
f87bd65ae1
3 changed files with 7 additions and 7 deletions
|
@ -472,7 +472,7 @@ namespace MWDialogue
|
||||||
|
|
||||||
void DialogueManager::parseText(std::string text)
|
void DialogueManager::parseText(std::string text)
|
||||||
{
|
{
|
||||||
std::map<std::string,std::list<ESM::DialInfo>>::iterator it;
|
std::map<std::string,std::list <ESM::DialInfo> >::iterator it;
|
||||||
for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++)
|
for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++)
|
||||||
{
|
{
|
||||||
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
|
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace MWDialogue
|
||||||
void parseText(std::string text);
|
void parseText(std::string text);
|
||||||
|
|
||||||
std::map<std::string,bool> knownTopics;// Those are the topics the player knows.
|
std::map<std::string,bool> knownTopics;// Those are the topics the player knows.
|
||||||
std::map<std::string,std::list<ESM::DialInfo>> actorKnownTopics;
|
std::map<std::string,std::list <ESM::DialInfo> > actorKnownTopics;
|
||||||
|
|
||||||
MWScript::CompilerContext mCompilerContext;
|
MWScript::CompilerContext mCompilerContext;
|
||||||
std::ostream mErrorStream;
|
std::ostream mErrorStream;
|
||||||
|
|
|
@ -104,7 +104,7 @@ void DialogueWindow::onSelectTopic(MyGUI::List* _sender, size_t _index)
|
||||||
{
|
{
|
||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
return;
|
||||||
std::string topic = _sender->getItem(_index);
|
std::string topic = _sender->getItemNameAt(_index);
|
||||||
mEnvironment.mDialogueManager->keywordSelected(lower_string(topic));
|
mEnvironment.mDialogueManager->keywordSelected(lower_string(topic));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,8 +126,8 @@ void DialogueWindow::removeKeyword(std::string keyWord)
|
||||||
{
|
{
|
||||||
if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE)
|
if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE)
|
||||||
{
|
{
|
||||||
std::cout << topicsList->findItem(keyWord);
|
std::cout << topicsList->findItemIndexWith(keyWord);
|
||||||
topicsList->removeItemAt(topicsList->findItem(keyWord));
|
topicsList->removeItemAt(topicsList->findItemIndexWith(keyWord));
|
||||||
pTopicsText.erase(keyWord);
|
pTopicsText.erase(keyWord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,9 +165,9 @@ 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)
|
||||||
{
|
{
|
||||||
for(int i = 0;i<topicsList->getItemCount();i++)
|
for(unsigned int i = 0;i<topicsList->getItemCount();i++)
|
||||||
{
|
{
|
||||||
std::string keyWord = topicsList->getItem(i);
|
std::string keyWord = topicsList->getItemNameAt(i);
|
||||||
addColorInString(text,keyWord,"#686EBA","#B29154");
|
addColorInString(text,keyWord,"#686EBA","#B29154");
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
|
Loading…
Reference in a new issue