1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-18 10:38:31 +02:00

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.
This commit is contained in:
Misa 2020-08-17 15:39:19 -07:00 committed by Ethan Lee
parent 743eb3f3d6
commit cf53de9ed5

View File

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