parent
7a66469b65
commit
5e9ffaad04
7 changed files with 82 additions and 3 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,48 @@ |
|||||||
|
#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); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
#pragma once |
||||||
|
|
||||||
|
namespace LockableDialogs |
||||||
|
{ |
||||||
|
class LockableDialogsEx : public RE::DialogueMenu |
||||||
|
{ |
||||||
|
public: |
||||||
|
static void Install(); |
||||||
|
|
||||||
|
public: |
||||||
|
RE::UI_MESSAGE_RESULTS ProcessMessageEx(RE::UIMessage& a_message); |
||||||
|
|
||||||
|
private: |
||||||
|
using ProcessMessageFn = decltype(&RE::DialogueMenu::ProcessMessage); |
||||||
|
|
||||||
|
inline static REL::Relocation<ProcessMessageFn> _ProcessMessageFn; |
||||||
|
}; |
||||||
|
} |
Loading…
Reference in new issue