client_ui.tscn 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. [node name="Label" type="Label" parent="VBoxContainer/Connect"]
  24. layout_mode = 2
  25. text = "Connect to:"
  26. [node name="Host" type="LineEdit" parent="VBoxContainer/Connect"]
  27. layout_mode = 2
  28. size_flags_horizontal = 3
  29. text = "ws://localhost:9080"
  30. [node name="Room" type="Label" parent="VBoxContainer/Connect"]
  31. layout_mode = 2
  32. size_flags_vertical = 5
  33. text = "Room"
  34. [node name="RoomSecret" type="LineEdit" parent="VBoxContainer/Connect"]
  35. layout_mode = 2
  36. placeholder_text = "secret"
  37. [node name="Mesh" type="CheckBox" parent="VBoxContainer/Connect"]
  38. layout_mode = 2
  39. button_pressed = true
  40. text = "Mesh"
  41. [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
  42. layout_mode = 2
  43. [node name="Start" type="Button" parent="VBoxContainer/HBoxContainer"]
  44. layout_mode = 2
  45. text = "Start"
  46. [node name="Stop" type="Button" parent="VBoxContainer/HBoxContainer"]
  47. layout_mode = 2
  48. text = "Stop"
  49. [node name="Seal" type="Button" parent="VBoxContainer/HBoxContainer"]
  50. layout_mode = 2
  51. text = "Seal"
  52. [node name="Ping" type="Button" parent="VBoxContainer/HBoxContainer"]
  53. layout_mode = 2
  54. text = "Ping"
  55. [node name="Peers" type="Button" parent="VBoxContainer/HBoxContainer"]
  56. layout_mode = 2
  57. text = "Print peers"
  58. [node name="TextEdit" type="TextEdit" parent="VBoxContainer"]
  59. layout_mode = 2
  60. size_flags_vertical = 3
  61. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Start" to="." method="_on_start_pressed"]
  62. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Stop" to="." method="_on_stop_pressed"]
  63. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Seal" to="." method="_on_seal_pressed"]
  64. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Ping" to="." method="_on_ping_pressed"]
  65. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Peers" to="." method="_on_peers_pressed"]