Unregister dialog exit listener on normal menu closing

This commit is contained in:
Eddoursul 2022-09-27 11:51:53 +02:00
parent 33345cc860
commit ff965bc21d
7 changed files with 23 additions and 15 deletions

Binary file not shown.

View File

@ -6,6 +6,11 @@ See https://en.wiki.sureai.net/Enderal:Patch for the list of official patches up
Beware, spoilers ahead! Beware, spoilers ahead!
2.0.12.4 (TBD)
- Skyrim SE 1.6.640 support.
- Fixed the dialog quit popup appearing in non-locked conversations.
2.0.12.3 (2022-09-16) 2.0.12.3 (2022-09-16)
- Excluded a few distant cells from testing, fixes compatibility with SkyVRaan. - Excluded a few distant cells from testing, fixes compatibility with SkyVRaan.
- Reverted dialoguemenu.swf to the pre-2.0.12 version and replaced quest journal in locked dialogs with a quit prompt. Discarded solution caused decreased input delay in menu mode and was making scrolling unusable. - Reverted dialoguemenu.swf to the pre-2.0.12 version and replaced quest journal in locked dialogs with a quit prompt. Discarded solution caused decreased input delay in menu mode and was making scrolling unusable.

View File

@ -1 +1 @@
version = 2.0.12.3 version = 2.0.12.4

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,7 @@
Scriptname _00E_PlayerSetUpScript extends ObjectReference Scriptname _00E_PlayerSetUpScript extends ObjectReference
{Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes. This script is important for proper updating, do not overwrite it.} {Initializes all the necessary Quests, maintains the player, contains various OnPlayerLoadGame() failsafes. This script is important for proper updating, do not overwrite it.}
Float Property CURRENT_PATCH_VERSION = 2.123 AutoReadOnly Float Property CURRENT_PATCH_VERSION = 2.124 AutoReadOnly
;===================================================================================== ;=====================================================================================

View File

@ -134,7 +134,11 @@ endFunction
Function DisableDialogueQuitting() Global Function DisableDialogueQuitting() Global
{Disables the TAB Key during dialogue. Resets automatically upon dialogue exit via Goodbye.} {Disables the TAB Key during dialogue. Resets automatically upon dialogue exit via Goodbye.}
if UI.IsMenuOpen("Dialogue Menu") if ! UI.IsMenuOpen("Dialogue Menu")
UnregisterDialogQuitKey()
return
endif
if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true if UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab") != true
; Suspected non-Enderal dialoguemenu.swf replacer, rechecking value in order to be sure. ; Suspected non-Enderal dialoguemenu.swf replacer, rechecking value in order to be sure.
UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", True) UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", True)
@ -142,7 +146,6 @@ Function DisableDialogueQuitting() Global
Debug.Notification("Detected incompatible dialoguemenu.swf!") Debug.Notification("Detected incompatible dialoguemenu.swf!")
endif endif
endif endif
endif
UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", False) UI.InvokeBool("Dialogue Menu", "_root.DialogueMenu_mc.SetVariable", False)
@ -154,6 +157,8 @@ Function DisableDialogueQuitting() Global
Levelsystem.RegisterForKey(iControllerKey) ; Controller Levelsystem.RegisterForKey(iControllerKey) ; Controller
endif endif
Levelsystem.RegisterForMenu("Dialogue Menu")
EndFunction EndFunction
Function EnableDialogueQuitting() Global Function EnableDialogueQuitting() Global
@ -166,17 +171,13 @@ EndFunction
function UnregisterDialogQuitKey() Global function UnregisterDialogQuitKey() Global
Quest Levelsystem = Game.GetForm(0x10AA2) as Quest Quest Levelsystem = Game.GetForm(0x10AA2) as Quest
Levelsystem.UnregisterForKey(1) Levelsystem.UnregisterForAllKeys()
Levelsystem.UnregisterForKey(15) Levelsystem.UnregisterForMenu("Dialogue Menu")
int iControllerKey = Input.GetMappedKey("Tween Menu", 0x02)
if iControllerKey > -1
Levelsystem.UnregisterForKey(iControllerKey)
endif
endfunction endfunction
Event OnKeyDown(Int KeyCode) Event OnKeyDown(Int KeyCode)
if UI.IsMenuOpen("Dialogue Menu") if UI.IsMenuOpen("Dialogue Menu")
if ! UI.IsMenuOpen("MessageBoxMenu") if ! UI.IsMenuOpen("MessageBoxMenu") && ! UI.GetBool("Dialogue Menu", "_root.DialogueMenu_mc.bEnableTab")
if (Game.GetFormFromFile(0x163D, "Update.esm") as Message).Show() == 1 if (Game.GetFormFromFile(0x163D, "Update.esm") as Message).Show() == 1
Game.QuitToMainMenu() Game.QuitToMainMenu()
endif endif
@ -968,6 +969,8 @@ Event OnMenuClose(String MenuName)
If MenuName == "Book Menu" If MenuName == "Book Menu"
MTToRemove.Remove() MTToRemove.Remove()
UnregisterForMenu("Book Menu") UnregisterForMenu("Book Menu")
elseif MenuName == "Dialogue Menu"
UnregisterDialogQuitKey()
EndIf EndIf
EndEvent EndEvent