mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Update loading demos for 4.0 (#776)
This commit is contained in:
@@ -2,12 +2,10 @@ extends VBoxContainer
|
||||
|
||||
|
||||
func _ready():
|
||||
var file = File.new()
|
||||
# Don't allow loading files that don't exist yet.
|
||||
$SaveLoad/LoadConfigFile.disabled = not file.file_exists(ProjectSettings.globalize_path("user://save_config_file.ini"))
|
||||
$SaveLoad/LoadJSON.disabled = not file.file_exists(ProjectSettings.globalize_path("user://save_json.json"))
|
||||
($SaveLoad/LoadConfigFile as Button).disabled = not FileAccess.file_exists("user://save_config_file.ini")
|
||||
($SaveLoad/LoadJSON as Button).disabled = not FileAccess.file_exists("user://save_json.json")
|
||||
|
||||
|
||||
func _on_open_user_data_folder_pressed():
|
||||
# warning-ignore:return_value_discarded
|
||||
OS.shell_open(ProjectSettings.globalize_path("user://"))
|
||||
|
||||
Reference in New Issue
Block a user