diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp index eb78e9e9d..c469f12a0 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.cpp +++ b/apps/openmw/mwdialogue/dialoguemanager.cpp @@ -472,7 +472,7 @@ namespace MWDialogue void DialogueManager::parseText(std::string text) { - std::map>::iterator it; + std::map >::iterator it; for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++) { MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); diff --git a/apps/openmw/mwdialogue/dialoguemanager.hpp b/apps/openmw/mwdialogue/dialoguemanager.hpp index f32305b46..2ea157562 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.hpp +++ b/apps/openmw/mwdialogue/dialoguemanager.hpp @@ -31,7 +31,7 @@ namespace MWDialogue void parseText(std::string text); std::map knownTopics;// Those are the topics the player knows. - std::map> actorKnownTopics; + std::map > actorKnownTopics; MWScript::CompilerContext mCompilerContext; std::ostream mErrorStream; diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 9b63ad6d2..549022e70 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -104,7 +104,7 @@ void DialogueWindow::onSelectTopic(MyGUI::List* _sender, size_t _index) { if (_index == MyGUI::ITEM_NONE) return; - std::string topic = _sender->getItem(_index); + std::string topic = _sender->getItemNameAt(_index); mEnvironment.mDialogueManager->keywordSelected(lower_string(topic)); } @@ -126,8 +126,8 @@ void DialogueWindow::removeKeyword(std::string keyWord) { if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE) { - std::cout << topicsList->findItem(keyWord); - topicsList->removeItemAt(topicsList->findItem(keyWord)); + std::cout << topicsList->findItemIndexWith(keyWord); + topicsList->removeItemAt(topicsList->findItemIndexWith(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) { - for(int i = 0;igetItemCount();i++) + for(unsigned int i = 0;igetItemCount();i++) { - std::string keyWord = topicsList->getItem(i); + std::string keyWord = topicsList->getItemNameAt(i); addColorInString(text,keyWord,"#686EBA","#B29154"); } return text;