Skip to content

Commit

Permalink
Update dialogue topics list after result script is run
Browse files Browse the repository at this point in the history
Regression from 0.42.
  • Loading branch information
scrawl committed Nov 15, 2017
1 parent 93e9df1 commit 35d68f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion apps/openmw/mwgui/dialogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ namespace MWGui
mWindow->addResponse(title, text, mNeedMargin);
}

void updateTopics()
{
mWindow->updateTopics();
}

private:
DialogueWindow* mWindow;
bool mNeedMargin;
Expand Down Expand Up @@ -91,6 +96,7 @@ namespace MWGui
type = MWBase::MechanicsManager::PT_Bribe1000;

MWBase::Environment::get().getDialogueManager()->persuade(type, mCallback.get());
mCallback->updateTopics();

setVisible(false);
}
Expand Down Expand Up @@ -395,6 +401,8 @@ namespace MWGui
else if (topic == gmst.find("sRepair")->getString())
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
}
else
updateTopics();
}
}

Expand Down Expand Up @@ -432,7 +440,9 @@ namespace MWGui

setTitle(mPtr.getClass().getName(mPtr));

updateTopicsPane();
updateTopics();
updateTopicsPane(); // force update for new services

updateDisposition();
restock();
}
Expand Down Expand Up @@ -620,11 +630,13 @@ namespace MWGui
void DialogueWindow::onTopicActivated(const std::string &topicId)
{
MWBase::Environment::get().getDialogueManager()->keywordSelected(topicId, mCallback.get());
updateTopics();
}

void DialogueWindow::onChoiceActivated(int id)
{
MWBase::Environment::get().getDialogueManager()->questionAnswered(id, mCallback.get());
updateTopics();
}

void DialogueWindow::onGoodbyeActivated()
Expand Down
3 changes: 2 additions & 1 deletion apps/openmw/mwgui/dialogue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ namespace MWGui
void onFrame(float dt);
void clear() { resetReference(); }

protected:
void updateTopics();

protected:
void updateTopicsPane();
bool isCompanion(const MWWorld::Ptr& actor);
bool isCompanion();
Expand Down

0 comments on commit 35d68f0

Please sign in to comment.