Updated the dialogue menu patch

This commit is contained in:
Eddoursul 2024-01-28 23:28:29 +01:00
parent a7109048e8
commit 3763b26754

View File

@ -25,8 +25,12 @@ private:
if (data && data->scaleformEvent->type == RE::GFxEvent::EventType::kKeyDown) {
RE::GFxKeyEvent* key = (RE::GFxKeyEvent*)data->scaleformEvent;
// Escape triggers a kTab event, added kEscape just in case
if (key && (key->keyCode == RE::GFxKey::kTab || key->keyCode == RE::GFxKey::kEscape) && !RE::UI::GetSingleton()->IsMenuOpen(RE::ContainerMenu::MENU_NAME) && !RE::UI::GetSingleton()->IsMenuOpen(RE::BarterMenu::MENU_NAME)) {
if (
key
// Escape triggers a kTab event, added kEscape just in case
&& (key->keyCode == RE::GFxKey::kTab || key->keyCode == RE::GFxKey::kEscape)
// Covers inventory and barter
&& !RE::UI::GetSingleton()->GameIsPaused()) {
OpenJournal(false);
return RE::UI_MESSAGE_RESULTS::kIgnore;
}