4
Fork 0

Possible implementation with bFadedIn

Eddoursul 2 years ago
parent 7a66469b65
commit 5e9ffaad04
  1. BIN
      SKSE/Plugins/EnderalSE.dll
  2. BIN
      interface/dialoguemenu.swf
  3. 1
      source/Enderal DLL/CMakeLists.txt
  4. 9
      source/Enderal DLL/src/EventListener.cpp
  5. 48
      source/Enderal DLL/src/LockableDialogs.cpp
  6. 18
      source/Enderal DLL/src/LockableDialogs.h
  7. 3
      source/Enderal DLL/src/Main.cpp

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.

@ -26,6 +26,7 @@ set(sources
src/Main.cpp
src/EventListener.cpp
src/Papyrus.cpp
src/LockableDialogs.cpp
${CMAKE_CURRENT_BINARY_DIR}/version.rc)

@ -57,6 +57,15 @@ auto EventListener::ProcessEvent(
}
}
if (a_event->opening && a_event->menuName == RE::DialogueMenu::MENU_NAME) {
if (auto ui = RE::UI::GetSingleton(); ui) {
if (auto menu = ui->GetMenu(RE::DialogueMenu::MENU_NAME); menu) {
const RE::GFxValue boolVal = false;
menu->uiMovie->SetVariable("_root.DialogueMenu_mc.bFadedIn", boolVal, RE::GFxMovie::SetVarType::kSticky);
}
}
}
return RE::BSEventNotifyControl::kContinue;
}

@ -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;
};
}

@ -3,6 +3,7 @@
#include "Papyrus.h"
#include "FlatMapMarkers.h"
#include "StayAtSystemPage.h"
#include "LockableDialogs.h"
using namespace SKSE;
@ -121,6 +122,8 @@ SKSEPluginLoad(const LoadInterface* skse) {
JournalMenuEx::InstallHooks();
}
//LockableDialogs::LockableDialogsEx::Install();
logger::info("{} has finished loading.", plugin->GetName());
return true;
}

Loading…
Cancel
Save