From cf53de9ed5cd82a5836cd3592d3c7f33ec139964 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 17 Aug 2020 15:39:19 -0700 Subject: [PATCH] Move text entry start to script open instead of script list open This fixes a bug where opening a script, then closing the script but not exiting the script list, then opening a script again (it can be the same script as before) would result in you being unable to type in the script. You would have to close the script, then close the script list, then re-open the script list in order to be able to type properly. This was caused by the fact that key.enabletextentry() was being called when the script list was opened, but key.disabletextentry() was being called when closing a script. So the fix for this is to simply move the key.enabletextentry() to its proper place, which is when the script is being opened, and not when the script list is. --- desktop_version/src/editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index e936886e..84d5087e 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -3786,7 +3786,6 @@ void editormenuactionpress() music.playef(11); ed.scripteditmod=true; ed.clearscriptbuffer(); - key.enabletextentry(); key.keybuffer=""; ed.hookmenupage=0; ed.hookmenu=0; @@ -4070,6 +4069,7 @@ void editorinput() { game.mapheld=true; ed.scripthelppage=1; + key.enabletextentry(); key.keybuffer=""; ed.sbscript=ed.hooklist[(ed.hooklist.size()-1)-ed.hookmenu]; ed.loadhookineditor(ed.sbscript);