This commit is contained in:
2026-09-22 17:45:29 +08:00
parent 2ecab991f8
commit b11da48e23
8 changed files with 328 additions and 197 deletions
+78
View File
@@ -0,0 +1,78 @@
[gd_scene format=3 uid="uid://l7aug4qrbosl"]
[ext_resource type="Script" uid="uid://tqratkoyv2up" path="res://autoload/net.gd" id="1_ftux4"]
[node name="Net" type="CanvasLayer" unique_id=707762690]
layer = 20
script = ExtResource("1_ftux4")
[node name="Menu" type="CenterContainer" parent="." unique_id=1952727206]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Panel" type="PanelContainer" parent="Menu" unique_id=1368615243]
layout_mode = 2
[node name="Box" type="VBoxContainer" parent="Menu/Panel" unique_id=230570449]
layout_mode = 2
theme_override_constants/separation = 10
[node name="Title" type="Label" parent="Menu/Panel/Box" unique_id=435547235]
layout_mode = 2
theme_override_font_sizes/font_size = 20
text = "联机测试"
[node name="AddressEdit" type="LineEdit" parent="Menu/Panel/Box" unique_id=1928211362]
custom_minimum_size = Vector2(240, 0)
layout_mode = 2
text = "127.0.0.1"
[node name="HostButton" type="Button" parent="Menu/Panel/Box" unique_id=2046876747]
layout_mode = 2
text = "创建主机"
[node name="JoinButton" type="Button" parent="Menu/Panel/Box" unique_id=440448657]
layout_mode = 2
text = "加入主机"
[node name="StatusLabel" type="Label" parent="Menu/Panel/Box" unique_id=273872406]
custom_minimum_size = Vector2(240, 0)
layout_mode = 2
autowrap_mode = 3
[node name="HintLabel" type="Label" parent="Menu/Panel/Box" unique_id=1270685438]
modulate = Color(1, 1, 1, 0.7)
custom_minimum_size = Vector2(240, 0)
layout_mode = 2
text = "局域网内填主机的内网 IP;本机双开测试填 127.0.0.1"
autowrap_mode = 3
[node name="Hud" type="Control" parent="." unique_id=1778234630]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="Box" type="VBoxContainer" parent="Hud" unique_id=623926462]
layout_mode = 0
offset_left = 16.0
offset_top = 12.0
mouse_filter = 2
[node name="StatusLabel" type="Label" parent="Hud/Box" unique_id=560394958]
layout_mode = 2
[node name="HintLabel" type="Label" parent="Hud/Box" unique_id=183207570]
modulate = Color(1, 1, 1, 0.7)
layout_mode = 2
text = "F10 断开 · Esc 释放鼠标"
[connection signal="pressed" from="Menu/Panel/Box/HostButton" to="." method="_on_host_button_pressed"]
[connection signal="pressed" from="Menu/Panel/Box/JoinButton" to="." method="_on_join_button_pressed"]