From 41a56eec7a1aef00b005f48c010b39294a6c7561 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Thu, 25 Jun 2020 23:25:46 +0300 Subject: [PATCH] Restore backup system in HTML5 Apparently backups do get stored in HTML5. I did not know that. I'm keeping "open last project" hidden though. --- src/Preferences/PreferencesDialog.gd | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Preferences/PreferencesDialog.gd b/src/Preferences/PreferencesDialog.gd index e6821c35c..3a996ddcc 100644 --- a/src/Preferences/PreferencesDialog.gd +++ b/src/Preferences/PreferencesDialog.gd @@ -36,6 +36,10 @@ func _ready() -> void: # Replace OK with Close since preference changes are being applied immediately, not after OK confirmation get_ok().text = tr("Close") + if OS.get_name() == "HTML5": + right_side.get_node("General/OpenLastProject").visible = false + Global.open_last_project = false + for pref in preferences: var node = right_side.get_node(pref[1]) @@ -55,13 +59,6 @@ func _ready() -> void: Global.set(pref[0], value) node.set(pref[2], value) - if OS.get_name() == "HTML5": - right_side.get_node("General/EnableAutosave").visible = false - right_side.get_node("General/AutosaveInterval").visible = false - right_side.get_node("General/OpenLastProject").visible = false - Global.enable_autosave = false - Global.open_last_project = false - func _on_Preference_toggled(button_pressed : bool, prop : String) -> void: Global.set(prop, button_pressed)