1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

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.
This commit is contained in:
OverloadedOrama 2020-06-25 23:25:46 +03:00
parent b8bdcfbb62
commit 41a56eec7a

View file

@ -36,6 +36,10 @@ func _ready() -> void:
# Replace OK with Close since preference changes are being applied immediately, not after OK confirmation # Replace OK with Close since preference changes are being applied immediately, not after OK confirmation
get_ok().text = tr("Close") 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: for pref in preferences:
var node = right_side.get_node(pref[1]) var node = right_side.get_node(pref[1])
@ -55,13 +59,6 @@ func _ready() -> void:
Global.set(pref[0], value) Global.set(pref[0], value)
node.set(pref[2], 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: func _on_Preference_toggled(button_pressed : bool, prop : String) -> void:
Global.set(prop, button_pressed) Global.set(prop, button_pressed)