2026-01-06 08:12:57 +08:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
|
|
|
|
$DataSetting/LineEdit.text = GameManager.data_origin
|
2026-01-06 08:27:35 +08:00
|
|
|
$IPBeginSetting/LineEdit.text = GameManager.ip_begin
|
2026-01-15 20:12:20 +08:00
|
|
|
$UsernameSetting/LineEdit.text = GameManager.username
|
2026-01-06 08:12:57 +08:00
|
|
|
|
|
|
|
|
func _on_save_button_pressed() -> void:
|
|
|
|
|
GameManager.data_origin = $DataSetting/LineEdit.text
|
2026-01-06 08:27:35 +08:00
|
|
|
GameManager.ip_begin = $IPBeginSetting/LineEdit.text
|
2026-01-15 20:12:20 +08:00
|
|
|
GameManager.username = $UsernameSetting/LineEdit.text
|
2026-01-06 08:12:57 +08:00
|
|
|
SceneManager.goto_scene("main_menu")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_cancel_button_pressed() -> void:
|
|
|
|
|
SceneManager.goto_scene("main_menu")
|
2026-01-21 08:14:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_download_button_pressed() -> void:
|
2026-01-21 11:42:57 +08:00
|
|
|
$Tips.text = "提示:已开始下载,请勿关闭设置页面"
|
|
|
|
|
var result: int = DownloadManager.download_from_origin()
|
|
|
|
|
if result == 1:
|
|
|
|
|
$Tips.text = "提示:下载失败。数据源路径错误"
|
2026-01-21 11:50:43 +08:00
|
|
|
return
|
|
|
|
|
elif result == 2:
|
|
|
|
|
$Tips.text = "提示:下载失败。创建请求失败"
|
|
|
|
|
return
|
2026-01-21 11:42:57 +08:00
|
|
|
$Tips.text = "提示:正在加载资源,请勿关闭设置页面"
|
|
|
|
|
DownloadManager.load_resource()
|
|
|
|
|
$Tips.text = "提示:完成加载"
|
2026-02-12 23:18:55 +08:00
|
|
|
|