Update dialogue topics list after result script is run

Regression from 0.42.
pull/1574/head openmw-0.43.0
scrawl 7 years ago
parent 93e9df15c9
commit 35d68f038d

@ -45,6 +45,11 @@ namespace MWGui
mWindow->addResponse(title, text, mNeedMargin); mWindow->addResponse(title, text, mNeedMargin);
} }
void updateTopics()
{
mWindow->updateTopics();
}
private: private:
DialogueWindow* mWindow; DialogueWindow* mWindow;
bool mNeedMargin; bool mNeedMargin;
@ -91,6 +96,7 @@ namespace MWGui
type = MWBase::MechanicsManager::PT_Bribe1000; type = MWBase::MechanicsManager::PT_Bribe1000;
MWBase::Environment::get().getDialogueManager()->persuade(type, mCallback.get()); MWBase::Environment::get().getDialogueManager()->persuade(type, mCallback.get());
mCallback->updateTopics();
setVisible(false); setVisible(false);
} }
@ -395,6 +401,8 @@ namespace MWGui
else if (topic == gmst.find("sRepair")->getString()) else if (topic == gmst.find("sRepair")->getString())
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr); MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
} }
else
updateTopics();
} }
} }
@ -432,7 +440,9 @@ namespace MWGui
setTitle(mPtr.getClass().getName(mPtr)); setTitle(mPtr.getClass().getName(mPtr));
updateTopicsPane(); updateTopics();
updateTopicsPane(); // force update for new services
updateDisposition(); updateDisposition();
restock(); restock();
} }
@ -620,11 +630,13 @@ namespace MWGui
void DialogueWindow::onTopicActivated(const std::string &topicId) void DialogueWindow::onTopicActivated(const std::string &topicId)
{ {
MWBase::Environment::get().getDialogueManager()->keywordSelected(topicId, mCallback.get()); MWBase::Environment::get().getDialogueManager()->keywordSelected(topicId, mCallback.get());
updateTopics();
} }
void DialogueWindow::onChoiceActivated(int id) void DialogueWindow::onChoiceActivated(int id)
{ {
MWBase::Environment::get().getDialogueManager()->questionAnswered(id, mCallback.get()); MWBase::Environment::get().getDialogueManager()->questionAnswered(id, mCallback.get());
updateTopics();
} }
void DialogueWindow::onGoodbyeActivated() void DialogueWindow::onGoodbyeActivated()

@ -131,8 +131,9 @@ namespace MWGui
void onFrame(float dt); void onFrame(float dt);
void clear() { resetReference(); } void clear() { resetReference(); }
protected:
void updateTopics(); void updateTopics();
protected:
void updateTopicsPane(); void updateTopicsPane();
bool isCompanion(const MWWorld::Ptr& actor); bool isCompanion(const MWWorld::Ptr& actor);
bool isCompanion(); bool isCompanion();

Loading…
Cancel
Save