client_ui.tscn 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. [gd_scene load_steps=3 format=3 uid="uid://cpwp4xx6mv5p"]
  2. [ext_resource type="Script" path="res://demo/client_ui.gd" id="1"]
  3. [ext_resource type="Script" path="res://client/multiplayer_client.gd" id="2"]
  4. [node name="ClientUI" type="Control"]
  5. layout_mode = 3
  6. anchors_preset = 0
  7. offset_right = 1024.0
  8. offset_bottom = 600.0
  9. size_flags_horizontal = 3
  10. size_flags_vertical = 3
  11. script = ExtResource("1")
  12. [node name="Client" type="Node" parent="."]
  13. script = ExtResource("2")
  14. [node name="VBoxContainer" type="VBoxContainer" parent="."]
  15. layout_mode = 1
  16. anchors_preset = 15
  17. anchor_right = 1.0
  18. anchor_bottom = 1.0
  19. grow_horizontal = 2
  20. grow_vertical = 2
  21. [node name="Connect" type="HBoxContainer" parent="VBoxContainer"]
  22. layout_mode = 2
  23. offset_right = 1024.0
  24. offset_bottom = 31.0
  25. [node name="Label" type="Label" parent="VBoxContainer/Connect"]
  26. layout_mode = 2
  27. offset_top = 2.0
  28. offset_right = 89.0
  29. offset_bottom = 28.0
  30. text = "Connect to:"
  31. [node name="Host" type="LineEdit" parent="VBoxContainer/Connect"]
  32. layout_mode = 2
  33. offset_left = 93.0
  34. offset_right = 829.0
  35. offset_bottom = 31.0
  36. size_flags_horizontal = 3
  37. text = "ws://localhost:9080"
  38. [node name="Room" type="Label" parent="VBoxContainer/Connect"]
  39. layout_mode = 2
  40. offset_left = 833.0
  41. offset_right = 879.0
  42. offset_bottom = 31.0
  43. size_flags_vertical = 5
  44. text = "Room"
  45. [node name="RoomSecret" type="LineEdit" parent="VBoxContainer/Connect"]
  46. layout_mode = 2
  47. offset_left = 883.0
  48. offset_right = 950.0
  49. offset_bottom = 31.0
  50. placeholder_text = "secret"
  51. [node name="Mesh" type="CheckBox" parent="VBoxContainer/Connect"]
  52. layout_mode = 2
  53. offset_left = 954.0
  54. offset_right = 1024.0
  55. offset_bottom = 31.0
  56. button_pressed = true
  57. text = "Mesh"
  58. [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
  59. layout_mode = 2
  60. offset_top = 35.0
  61. offset_right = 1024.0
  62. offset_bottom = 66.0
  63. [node name="Start" type="Button" parent="VBoxContainer/HBoxContainer"]
  64. layout_mode = 2
  65. offset_right = 46.0
  66. offset_bottom = 31.0
  67. text = "Start"
  68. [node name="Stop" type="Button" parent="VBoxContainer/HBoxContainer"]
  69. layout_mode = 2
  70. offset_left = 50.0
  71. offset_right = 93.0
  72. offset_bottom = 31.0
  73. text = "Stop"
  74. [node name="Seal" type="Button" parent="VBoxContainer/HBoxContainer"]
  75. layout_mode = 2
  76. offset_left = 97.0
  77. offset_right = 137.0
  78. offset_bottom = 31.0
  79. text = "Seal"
  80. [node name="Ping" type="Button" parent="VBoxContainer/HBoxContainer"]
  81. layout_mode = 2
  82. offset_left = 141.0
  83. offset_right = 183.0
  84. offset_bottom = 31.0
  85. text = "Ping"
  86. [node name="Peers" type="Button" parent="VBoxContainer/HBoxContainer"]
  87. layout_mode = 2
  88. offset_left = 187.0
  89. offset_right = 280.0
  90. offset_bottom = 31.0
  91. text = "Print peers"
  92. [node name="TextEdit" type="TextEdit" parent="VBoxContainer"]
  93. layout_mode = 2
  94. offset_top = 70.0
  95. offset_right = 1024.0
  96. offset_bottom = 600.0
  97. size_flags_vertical = 3
  98. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Start" to="." method="_on_start_pressed"]
  99. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Stop" to="." method="_on_stop_pressed"]
  100. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Seal" to="." method="_on_seal_pressed"]
  101. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Ping" to="." method="_on_ping_pressed"]
  102. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Peers" to="." method="_on_peers_pressed"]