dev: 函数统一间隔两行
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
init_sources()
|
||||
init_text()
|
||||
|
||||
|
||||
func init_text() -> void:
|
||||
$DataSetting/LineEdit.text = GameManager.data_origin
|
||||
$IPBeginSetting/LineEdit.text = GameManager.ip_begin
|
||||
$UsernameSetting/LineEdit.text = GameManager.username
|
||||
$LoadSource/ChooseSource.select(GameManager.source)
|
||||
|
||||
|
||||
func init_sources() -> void:
|
||||
DownloadManager.get_sources()
|
||||
for source_name in GameManager.sources:
|
||||
$LoadSource/ChooseSource.add_item(source_name)
|
||||
|
||||
|
||||
func _on_save_button_pressed() -> void:
|
||||
GameManager.data_origin = $DataSetting/LineEdit.text
|
||||
GameManager.ip_begin = $IPBeginSetting/LineEdit.text
|
||||
@@ -42,7 +46,6 @@ func _on_download_button_pressed() -> void:
|
||||
$Tips.text = "SETTINGS_TIP_LOADED"
|
||||
|
||||
|
||||
|
||||
func _on_load_button_pressed() -> void:
|
||||
if GameManager.sources.size() == 0 or GameManager.source == -1:
|
||||
$Tips.text = "SETTINGS_TIP_NOLOCALSOURCE"
|
||||
|
||||
Reference in New Issue
Block a user