mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
commit
5ccf7da17a
@ -432,29 +432,26 @@ namespace MWGui
|
|||||||
mGoodbye = false;
|
mGoodbye = false;
|
||||||
mTopicsList->setEnabled(true);
|
mTopicsList->setEnabled(true);
|
||||||
|
|
||||||
setTitle(mPtr.getClass().getName(mPtr));
|
if (!MWBase::Environment::get().getDialogueManager()->startDialogue(actor, mGreetingCallback.get()))
|
||||||
|
|
||||||
updateDisposition();
|
|
||||||
restock();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DialogueWindow::onOpen()
|
|
||||||
{
|
|
||||||
if (!MWBase::Environment::get().getDialogueManager()->startDialogue(mPtr, mGreetingCallback.get()))
|
|
||||||
{
|
{
|
||||||
// No greetings found. The dialogue window should not be shown.
|
// No greetings found. The dialogue window should not be shown.
|
||||||
// If this is a companion, we must show the companion window directly (used by BM_bear_be_unique).
|
// If this is a companion, we must show the companion window directly (used by BM_bear_be_unique).
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||||
if (isCompanion(mPtr))
|
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Companion, mPtr);
|
|
||||||
mPtr = MWWorld::Ptr();
|
mPtr = MWWorld::Ptr();
|
||||||
|
if (isCompanion(actor))
|
||||||
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Companion, actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
|
||||||
|
|
||||||
|
setTitle(mPtr.getClass().getName(mPtr));
|
||||||
|
|
||||||
updateTopics();
|
updateTopics();
|
||||||
updateTopicsPane(); // force update for new services
|
updateTopicsPane(); // force update for new services
|
||||||
|
|
||||||
|
updateDisposition();
|
||||||
|
restock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::restock()
|
void DialogueWindow::restock()
|
||||||
|
@ -122,8 +122,6 @@ namespace MWGui
|
|||||||
|
|
||||||
void setPtr(const MWWorld::Ptr& actor);
|
void setPtr(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
void onOpen();
|
|
||||||
|
|
||||||
void setKeywords(std::list<std::string> keyWord);
|
void setKeywords(std::list<std::string> keyWord);
|
||||||
|
|
||||||
void addResponse (const std::string& title, const std::string& text, bool needMargin = true);
|
void addResponse (const std::string& title, const std::string& text, bool needMargin = true);
|
||||||
|
@ -1271,8 +1271,6 @@ namespace MWGui
|
|||||||
if (mode==GM_Inventory && mAllowed==GW_None)
|
if (mode==GM_Inventory && mAllowed==GW_None)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (WindowBase* window : mGuiModeStates[mode].mWindows)
|
|
||||||
window->setPtr(arg);
|
|
||||||
if (mGuiModes.empty() || mGuiModes.back() != mode)
|
if (mGuiModes.empty() || mGuiModes.back() != mode)
|
||||||
{
|
{
|
||||||
// If this mode already exists somewhere in the stack, just bring it to the front.
|
// If this mode already exists somewhere in the stack, just bring it to the front.
|
||||||
@ -1291,6 +1289,8 @@ namespace MWGui
|
|||||||
mGuiModeStates[mode].update(true);
|
mGuiModeStates[mode].update(true);
|
||||||
playSound(mGuiModeStates[mode].mOpenSound);
|
playSound(mGuiModeStates[mode].mOpenSound);
|
||||||
}
|
}
|
||||||
|
for (WindowBase* window : mGuiModeStates[mode].mWindows)
|
||||||
|
window->setPtr(arg);
|
||||||
|
|
||||||
mKeyboardNavigation->restoreFocus(mode);
|
mKeyboardNavigation->restoreFocus(mode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user