mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Move Saving and Loading demo to Loading category
This commit is contained in:
13
loading/serialization/gui.gd
Normal file
13
loading/serialization/gui.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
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"))
|
||||
|
||||
|
||||
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