Main.tscn 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [gd_scene load_steps=3 format=3 uid="uid://cxaa046x45suv"]
  2. [ext_resource type="Script" path="res://server.gd" id="1"]
  3. [ext_resource type="Script" path="res://client.gd" id="2"]
  4. [node name="Main" type="Node"]
  5. [node name="Server" type="Node" parent="."]
  6. script = ExtResource("1")
  7. [node name="Client" type="Node" parent="."]
  8. script = ExtResource("2")
  9. [node name="Control" type="Control" parent="."]
  10. layout_mode = 3
  11. anchors_preset = 15
  12. anchor_right = 1.0
  13. anchor_bottom = 1.0
  14. grow_horizontal = 2
  15. grow_vertical = 2
  16. [node name="HBoxContainer" type="HBoxContainer" parent="Control"]
  17. layout_mode = 1
  18. anchors_preset = 15
  19. anchor_right = 1.0
  20. anchor_bottom = 1.0
  21. grow_horizontal = 2
  22. grow_vertical = 2
  23. [node name="ServerContainer" type="VBoxContainer" parent="Control/HBoxContainer"]
  24. layout_mode = 2
  25. size_flags_horizontal = 3
  26. [node name="LabelServer" type="Label" parent="Control/HBoxContainer/ServerContainer"]
  27. layout_mode = 2
  28. size_flags_horizontal = 4
  29. theme_override_colors/font_color = Color(0.666667, 0.666667, 0.666667, 1)
  30. theme_override_font_sizes/font_size = 30
  31. text = "Server"
  32. [node name="ButtonPong" type="Button" parent="Control/HBoxContainer/ServerContainer"]
  33. layout_mode = 2
  34. size_flags_horizontal = 4
  35. theme_override_font_sizes/font_size = 30
  36. text = "Send Pong"
  37. [node name="TextServer" type="RichTextLabel" parent="Control/HBoxContainer/ServerContainer"]
  38. unique_name_in_owner = true
  39. layout_mode = 2
  40. size_flags_vertical = 3
  41. bbcode_enabled = true
  42. scroll_following = true
  43. [node name="ClientContainer" type="VBoxContainer" parent="Control/HBoxContainer"]
  44. layout_mode = 2
  45. size_flags_horizontal = 3
  46. [node name="LabelClient" type="Label" parent="Control/HBoxContainer/ClientContainer"]
  47. layout_mode = 2
  48. size_flags_horizontal = 4
  49. theme_override_colors/font_color = Color(0.666667, 0.666667, 0.666667, 1)
  50. theme_override_font_sizes/font_size = 30
  51. text = "Client"
  52. [node name="ButtonPing" type="Button" parent="Control/HBoxContainer/ClientContainer"]
  53. layout_mode = 2
  54. size_flags_horizontal = 4
  55. theme_override_font_sizes/font_size = 30
  56. text = "Send Ping"
  57. [node name="TextClient" type="RichTextLabel" parent="Control/HBoxContainer/ClientContainer"]
  58. unique_name_in_owner = true
  59. layout_mode = 2
  60. size_flags_vertical = 3
  61. bbcode_enabled = true
  62. scroll_following = true
  63. [connection signal="pressed" from="Control/HBoxContainer/ServerContainer/ButtonPong" to="Server" method="_on_button_pong_pressed"]
  64. [connection signal="pressed" from="Control/HBoxContainer/ClientContainer/ButtonPing" to="Client" method="_on_button_ping_pressed"]