Script editor now saves state when switching to other tabs. Updated to version 0.19.4

This commit is contained in:
Daniel Xie
2017-06-02 12:18:53 -05:00
parent b85783cebc
commit a3d45b3cc2
5 changed files with 6 additions and 18 deletions
+2 -4
View File
@@ -104,12 +104,10 @@ var Engine = {
loadScriptEditorContent: function(filename = "", code = "") {
Engine.hideAllContent();
Engine.Display.scriptEditorContent.style.visibility = "visible";
if (filename == "") {
document.getElementById("script-editor-filename").value = "untitled";
} else {
if (filename != "") {
document.getElementById("script-editor-filename").value = filename;
document.getElementById("script-editor-text").value = code;
}
document.getElementById("script-editor-text").value = code;
document.getElementById("script-editor-text").focus();
Engine.currentPage = Engine.Page.ScriptEditor;