forked from teamnwah/openmw-tes3coop
Issue #107: fixed up some interfaces
This commit is contained in:
parent
28ecfb4290
commit
e6ede480c7
2 changed files with 14 additions and 14 deletions
|
@ -599,12 +599,12 @@ namespace MWDialogue
|
|||
}
|
||||
}
|
||||
|
||||
void DialogueManager::addTopic(std::string topic)
|
||||
void DialogueManager::addTopic (const std::string& topic)
|
||||
{
|
||||
mKnownTopics[toLower(topic)] = true;
|
||||
}
|
||||
|
||||
void DialogueManager::parseText(std::string text)
|
||||
void DialogueManager::parseText (std::string text)
|
||||
{
|
||||
std::list<std::string>::iterator it;
|
||||
for(it = mActorKnownTopics.begin();it != mActorKnownTopics.end();++it)
|
||||
|
@ -804,7 +804,7 @@ namespace MWDialogue
|
|||
mChoice = choice;
|
||||
}
|
||||
|
||||
void DialogueManager::keywordSelected(std::string keyword)
|
||||
void DialogueManager::keywordSelected (const std::string& keyword)
|
||||
{
|
||||
if(!mIsInChoice)
|
||||
{
|
||||
|
@ -846,11 +846,11 @@ namespace MWDialogue
|
|||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||
}
|
||||
|
||||
void DialogueManager::questionAnswered(std::string answere)
|
||||
void DialogueManager::questionAnswered (const std::string& answer)
|
||||
{
|
||||
if(mChoiceMap.find(answere) != mChoiceMap.end())
|
||||
if(mChoiceMap.find(answer) != mChoiceMap.end())
|
||||
{
|
||||
mChoice = mChoiceMap[answere];
|
||||
mChoice = mChoiceMap[answer];
|
||||
|
||||
std::vector<ESM::DialInfo>::const_iterator iter;
|
||||
if(mDialogueMap.find(mLastTopic) != mDialogueMap.end())
|
||||
|
@ -882,13 +882,13 @@ namespace MWDialogue
|
|||
}
|
||||
}
|
||||
|
||||
void DialogueManager::printError(std::string error)
|
||||
void DialogueManager::printError (std::string error)
|
||||
{
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
win->addText(error);
|
||||
}
|
||||
|
||||
void DialogueManager::askQuestion(std::string question, int choice)
|
||||
void DialogueManager::askQuestion (const std::string& question, int choice)
|
||||
{
|
||||
MWGui::DialogueWindow* win = MWBase::Environment::get().getWindowManager()->getDialogueWindow();
|
||||
win->askQuestion(question);
|
||||
|
@ -896,7 +896,7 @@ namespace MWDialogue
|
|||
mIsInChoice = true;
|
||||
}
|
||||
|
||||
std::string DialogueManager::getFaction()
|
||||
std::string DialogueManager::getFaction() const
|
||||
{
|
||||
if (mActor.getTypeName() != typeid(ESM::NPC).name())
|
||||
return "";
|
||||
|
|
|
@ -52,19 +52,19 @@ namespace MWDialogue
|
|||
|
||||
void startDialogue (const MWWorld::Ptr& actor);
|
||||
|
||||
void addTopic(std::string topic);
|
||||
void addTopic (const std::string& topic);
|
||||
|
||||
void askQuestion(std::string question,int choice);
|
||||
void askQuestion (const std::string& question,int choice);
|
||||
|
||||
void goodbye();
|
||||
|
||||
///get the faction of the actor you are talking with
|
||||
std::string getFaction();
|
||||
std::string getFaction() const;
|
||||
|
||||
//calbacks for the GUI
|
||||
void keywordSelected(std::string keyword);
|
||||
void keywordSelected (const std::string& keyword);
|
||||
void goodbyeSelected();
|
||||
void questionAnswered(std::string answere);
|
||||
void questionAnswered (const std::string& answer);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue