Fixed quest journal opening in locked conversations

This commit is contained in:
Eddoursul 2022-08-05 02:24:12 +02:00
parent 9e088bb673
commit 30cdb4cf69
3 changed files with 17 additions and 14 deletions

BIN
SKSE/Plugins/EnderalSE.dll (Stored with Git LFS)

Binary file not shown.

BIN
interface/dialoguemenu.swf (Stored with Git LFS)

Binary file not shown.

View File

@ -22,6 +22,9 @@ auto EventListener::ProcessEvent(
if (a_event->eventName == "Enderal_OpenHelpURL") {
ShowWindow(GetForegroundWindow(), SW_MINIMIZE);
ShellExecuteA(NULL, "open", "https://go.eddoursul.win/enderal-se-support", NULL, NULL, SW_SHOWNORMAL);
//} else if (a_event->eventName == "Enderal_OpenQuestJournal") {
// RE::UIMessageQueue::GetSingleton()->AddMessage(RE::InterfaceStrings::GetSingleton()->journalMenu, RE::UI_MESSAGE_TYPE::kShow, 0i64);
}
return RE::BSEventNotifyControl::kContinue;
@ -42,16 +45,16 @@ auto EventListener::ProcessEvent(
RE::BSTEventSource<RE::MenuOpenCloseEvent>* a_eventSource)
-> RE::BSEventNotifyControl
{
if (a_event->menuName == "ContainerMenu") {
#ifdef _DEBUG
SKSE::log::info("MenuOpenCloseEvent");
#endif
bool bOpening = a_event->opening;
//
if (a_event->opening && a_event->menuName == RE::JournalMenu::MENU_NAME) {
if (RE::UI::GetSingleton()->IsMenuOpen(RE::DialogueMenu::MENU_NAME)) {
const auto movie = RE::UI::GetSingleton()->GetMovieView(RE::JournalMenu::MENU_NAME);
if (movie) {
std::array<RE::GFxValue, 2> args;
args[0].SetNumber(2);
args[1].SetBoolean(true);
movie->Invoke("_root.QuestJournalFader.Menu_mc.RestoreSavedSettings", nullptr, args.data(), static_cast<std::uint32_t>(args.size()));
}
}
}
return RE::BSEventNotifyControl::kContinue;