diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp index ef68226436..91785819f9 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.cpp +++ b/apps/openmw/mwdialogue/dialoguemanager.cpp @@ -168,11 +168,11 @@ namespace MWDialogue if(!selectCompare(comp,0,select.i)) return false; break; - case 40://PC Common Disease + case 40://PC Common Disease if(!selectCompare(comp,0,select.i)) return false; break; - case 41://PC Blight Disease + case 41://PC Blight Disease if(!selectCompare(comp,0,select.i)) return false; break; @@ -340,7 +340,7 @@ namespace MWDialogue } return true; - + case '6'://dead if(!selectCompare(comp,0,select.i)) return false; @@ -390,7 +390,6 @@ namespace MWDialogue { ESMS::LiveCellRef* npc = actor.get(); int isRace = int(toLower(npc->base->race) == toLower(name)); - //std::cout << "isRace"<(comp,!isRace,select.i)) return false; } @@ -522,14 +521,6 @@ namespace MWDialogue if (!isMatching (actor, *iter)) return false; - /*std::cout - << "unchecked entries:" << std::endl - << " player faction: " << info.pcFaction << std::endl - << " disposition: " << info.data.disposition << std::endl - << " NPC rank: " << static_cast (info.data.rank) << std::endl - << " gender: " << static_cast (info.data.gender) << std::endl - << " PC rank: " << static_cast (info.data.PCrank) << std::endl;*/ - return true; } @@ -552,7 +543,6 @@ namespace MWDialogue std::list::iterator it; for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++) { - MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); size_t pos = find_str_ci(text,*it,0); if(pos !=std::string::npos) { @@ -573,7 +563,6 @@ namespace MWDialogue { mChoice = -1; mIsInChoice = false; - std::cout << "talking with " << MWWorld::Class::get (actor).getName (actor) << std::endl; mActor = actor; @@ -584,7 +573,7 @@ namespace MWDialogue { mDialogueMap[it->first] = it->second; } - + //initialise the GUI mEnvironment.mInputManager->setGuiMode(MWGui::GM_Dialogue); MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow(); @@ -743,7 +732,7 @@ namespace MWDialogue win->addTitle(keyword); win->addText(iter->response); - executeScript(script); + executeScript(script); mLastTopic = keyword; mLastDialogue = *iter; diff --git a/apps/openmw/mwdialogue/journal.cpp b/apps/openmw/mwdialogue/journal.cpp index ea4a5a01e2..0715214ebd 100644 --- a/apps/openmw/mwdialogue/journal.cpp +++ b/apps/openmw/mwdialogue/journal.cpp @@ -3,6 +3,9 @@ #include "../mwworld/environment.hpp" +#include "../mwgui/window_manager.hpp" +#include "../mwgui/messagebox.hpp" + namespace MWDialogue { Quest& Journal::getQuest (const std::string& id) @@ -34,6 +37,10 @@ namespace MWDialogue Quest& quest = getQuest (id); quest.addEntry (entry, *mEnvironment.mWorld); // we are doing slicing on purpose here + + std::vector empty; + std::string notification = "Your Journal has been updated."; + mEnvironment.mWindowManager->messageBox (notification, empty); } void Journal::setJournalIndex (const std::string& id, int index) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 5ab8604431..cef47d074e 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -51,7 +51,7 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager,MWWorld::Environm history->setOverflowToTheLeft(true); history->getClient()->eventMouseButtonClick = MyGUI::newDelegate(this, &DialogueWindow::onHistoryClicked); history->setMaxTextLength(1000000); - //Topics list + //Topics list getWidget(topicsList, "TopicsList"); topicsList->setScrollVisible(true); //topicsList->eventListSelectAccept = MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic); @@ -64,7 +64,6 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager,MWWorld::Environm getWidget(pDispositionBar, "Disposition"); getWidget(pDispositionText,"DispositionText"); - std::cout << "creation dialogue"; } void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender) @@ -126,7 +125,6 @@ void DialogueWindow::removeKeyword(std::string keyWord) { if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE) { - std::cout << topicsList->findItemIndexWith(keyWord); topicsList->removeItemAt(topicsList->findItemIndexWith(keyWord)); pTopicsText.erase(keyWord); } @@ -145,7 +143,7 @@ void addColorInString(std::string& str, const std::string& keyword,std::string c str.insert(pos,color2); pos+= color2.length(); } - else + else { if(str.substr(pos -1,1) == " ") { @@ -200,4 +198,3 @@ void DialogueWindow::updateOptions() pDispositionText->eraseText(0,pDispositionText->getTextLength()); pDispositionText->addText("#B29154"+std::string("40/100")+"#B29154"); } -