client_ui.tscn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://demo/client_ui.gd" type="Script" id=1]
  3. [ext_resource path="res://client/multiplayer_client.gd" type="Script" id=2]
  4. [node name="ClientUI" type="Control"]
  5. margin_right = 1024.0
  6. margin_bottom = 600.0
  7. size_flags_horizontal = 3
  8. size_flags_vertical = 3
  9. script = ExtResource( 1 )
  10. __meta__ = {
  11. "_edit_use_anchors_": true
  12. }
  13. [node name="Client" type="Node" parent="."]
  14. script = ExtResource( 2 )
  15. [node name="VBoxContainer" type="VBoxContainer" parent="."]
  16. anchor_right = 1.0
  17. anchor_bottom = 1.0
  18. custom_constants/separation = 8
  19. __meta__ = {
  20. "_edit_use_anchors_": false
  21. }
  22. [node name="Connect" type="HBoxContainer" parent="VBoxContainer"]
  23. margin_right = 1024.0
  24. margin_bottom = 24.0
  25. [node name="Label" type="Label" parent="VBoxContainer/Connect"]
  26. margin_top = 5.0
  27. margin_right = 73.0
  28. margin_bottom = 19.0
  29. text = "Connect to:"
  30. [node name="Host" type="LineEdit" parent="VBoxContainer/Connect"]
  31. margin_left = 77.0
  32. margin_right = 921.0
  33. margin_bottom = 24.0
  34. size_flags_horizontal = 3
  35. text = "ws://localhost:9080"
  36. [node name="Room" type="Label" parent="VBoxContainer/Connect"]
  37. margin_left = 925.0
  38. margin_right = 962.0
  39. margin_bottom = 24.0
  40. size_flags_vertical = 5
  41. text = "Room"
  42. valign = 1
  43. [node name="RoomSecret" type="LineEdit" parent="VBoxContainer/Connect"]
  44. margin_left = 966.0
  45. margin_right = 1024.0
  46. margin_bottom = 24.0
  47. placeholder_text = "secret"
  48. [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
  49. margin_top = 32.0
  50. margin_right = 1024.0
  51. margin_bottom = 52.0
  52. custom_constants/separation = 10
  53. __meta__ = {
  54. "_edit_use_anchors_": false
  55. }
  56. [node name="Start" type="Button" parent="VBoxContainer/HBoxContainer"]
  57. margin_right = 41.0
  58. margin_bottom = 20.0
  59. text = "Start"
  60. [node name="Stop" type="Button" parent="VBoxContainer/HBoxContainer"]
  61. margin_left = 51.0
  62. margin_right = 91.0
  63. margin_bottom = 20.0
  64. text = "Stop"
  65. [node name="Seal" type="Button" parent="VBoxContainer/HBoxContainer"]
  66. margin_left = 101.0
  67. margin_right = 139.0
  68. margin_bottom = 20.0
  69. text = "Seal"
  70. [node name="Ping" type="Button" parent="VBoxContainer/HBoxContainer"]
  71. margin_left = 149.0
  72. margin_right = 188.0
  73. margin_bottom = 20.0
  74. text = "Ping"
  75. [node name="Peers" type="Button" parent="VBoxContainer/HBoxContainer"]
  76. margin_left = 198.0
  77. margin_right = 280.0
  78. margin_bottom = 20.0
  79. text = "Print peers"
  80. [node name="TextEdit" type="TextEdit" parent="VBoxContainer"]
  81. margin_top = 60.0
  82. margin_right = 1024.0
  83. margin_bottom = 600.0
  84. size_flags_vertical = 3
  85. readonly = true
  86. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Start" to="." method="start"]
  87. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Stop" to="." method="stop"]
  88. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Seal" to="." method="_on_Seal_pressed"]
  89. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Ping" to="." method="ping"]
  90. [connection signal="pressed" from="VBoxContainer/HBoxContainer/Peers" to="." method="_on_Peers_pressed"]