mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 20:15:35 +00:00
Update dialogue topics list after result script is run
Regression from 0.42.
This commit is contained in:
parent
93e9df15c9
commit
35d68f038d
2 changed files with 15 additions and 2 deletions
|
@ -45,6 +45,11 @@ namespace MWGui
|
|||
mWindow->addResponse(title, text, mNeedMargin);
|
||||
}
|
||||
|
||||
void updateTopics()
|
||||
{
|
||||
mWindow->updateTopics();
|
||||
}
|
||||
|
||||
private:
|
||||
DialogueWindow* mWindow;
|
||||
bool mNeedMargin;
|
||||
|
@ -91,6 +96,7 @@ namespace MWGui
|
|||
type = MWBase::MechanicsManager::PT_Bribe1000;
|
||||
|
||||
MWBase::Environment::get().getDialogueManager()->persuade(type, mCallback.get());
|
||||
mCallback->updateTopics();
|
||||
|
||||
setVisible(false);
|
||||
}
|
||||
|
@ -395,6 +401,8 @@ namespace MWGui
|
|||
else if (topic == gmst.find("sRepair")->getString())
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(GM_MerchantRepair, mPtr);
|
||||
}
|
||||
else
|
||||
updateTopics();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -432,7 +440,9 @@ namespace MWGui
|
|||
|
||||
setTitle(mPtr.getClass().getName(mPtr));
|
||||
|
||||
updateTopicsPane();
|
||||
updateTopics();
|
||||
updateTopicsPane(); // force update for new services
|
||||
|
||||
updateDisposition();
|
||||
restock();
|
||||
}
|
||||
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue