4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.3 KiB

#include "LockableDialogs.h"
namespace LockableDialogs
{
RE::UI_MESSAGE_RESULTS LockableDialogsEx::ProcessMessageEx(RE::UIMessage& a_message)
{
using Message = RE::UI_MESSAGE_TYPE; // this gives easy access to the message types, like kShow etc.
if (a_message.type == Message::kHide) {
/*
if (auto ui = RE::UI::GetSingleton(); ui) {
if (auto menu = ui->GetMenu(RE::DialogueMenu::MENU_NAME); menu) {
RE::GFxValue bEnableTab;
const auto movie = RE::UI::GetSingleton()->GetMovieView(RE::DialogueMenu::MENU_NAME);
if (movie) {
if (movie->GetVariable(&bEnableTab, "_root.DialogueMenu_mc.bEnableTab") && !bEnableTab.GetBool()) {
RE::DebugNotification("LOCKED");
}
}
}
}
*/
return RE::UI_MESSAGE_RESULTS::kIgnore;
}
return _ProcessMessageFn(this, a_message);
}
/*
void DialogueMenuEx::doAllowProgressFix()
{
if (auto ui = RE::UI::GetSingleton(); ui) {
if (auto menu = ui->GetMenu(RE::DialogueMenu::MENU_NAME); menu) {
const RE::GFxValue forceTrue = true;
menu->uiMovie->SetVariable("_root.DialogueMenu_mc.bAllowProgress", true, RE::GFxMovie::SetVarType::kSticky);
}
}
}
*/
void LockableDialogsEx::Install()
{
REL::Relocation<uintptr_t> vtbl(RE::VTABLE_DialogueMenu[0]);
_ProcessMessageFn = vtbl.write_vfunc(0x4, &ProcessMessageEx);
}
}