feat: 优化UI操作逻辑,增加退出游戏按钮
This commit is contained in:
@@ -20,6 +20,7 @@ func init() -> void:
|
||||
for address in addresses:
|
||||
if address.substr(0, GameManager.ip_begin.length()) == GameManager.ip_begin:
|
||||
ipaddress = address
|
||||
break
|
||||
$IPLabel.text = ipaddress
|
||||
$Player1/Username.text = GameManager.username
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ func _on_join_game_pressed() -> void:
|
||||
func _on_start_game_pressed() -> void:
|
||||
$CreateGameUI.show()
|
||||
|
||||
|
||||
func _on_setting_button_pressed() -> void:
|
||||
SceneManager.goto_scene("settings")
|
||||
|
||||
func _on_quit_game_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
@@ -20,7 +20,7 @@ func _on_save_button_pressed() -> void:
|
||||
GameManager.ip_begin = $IPBeginSetting/LineEdit.text
|
||||
GameManager.username = $UsernameSetting/LineEdit.text
|
||||
GameManager.source = $LoadSource/ChooseSource.get_selected()
|
||||
SceneManager.goto_scene("main_menu")
|
||||
$Tips.text = "提示:保存设置成功"
|
||||
|
||||
|
||||
func _on_cancel_button_pressed() -> void:
|
||||
|
||||
Reference in New Issue
Block a user