main.tscn 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [gd_scene load_steps=4 format=3 uid="uid://5p1bp2kcs0py"]
  2. [ext_resource type="Script" path="res://demo/main.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://cpwp4xx6mv5p" path="res://demo/client_ui.tscn" id="2"]
  4. [ext_resource type="Script" path="res://server/ws_webrtc_server.gd" id="3"]
  5. [node name="Control" type="Control"]
  6. layout_mode = 3
  7. anchor_left = 0.0136719
  8. anchor_top = 0.0166667
  9. anchor_right = 0.986328
  10. anchor_bottom = 0.983333
  11. script = ExtResource("1")
  12. [node name="VBoxContainer" type="VBoxContainer" parent="."]
  13. anchors_preset = 15
  14. anchor_right = 1.0
  15. anchor_bottom = 1.0
  16. grow_horizontal = 2
  17. grow_vertical = 2
  18. [node name="Signaling" type="HBoxContainer" parent="VBoxContainer"]
  19. offset_right = 1120.0
  20. offset_bottom = 31.0
  21. [node name="Label" type="Label" parent="VBoxContainer/Signaling"]
  22. offset_top = 2.0
  23. offset_right = 127.0
  24. offset_bottom = 28.0
  25. text = "Signaling server:"
  26. [node name="Port" type="SpinBox" parent="VBoxContainer/Signaling"]
  27. offset_left = 131.0
  28. offset_right = 214.0
  29. offset_bottom = 31.0
  30. min_value = 1025.0
  31. max_value = 65535.0
  32. value = 9080.0
  33. [node name="ListenButton" type="Button" parent="VBoxContainer/Signaling"]
  34. offset_left = 218.0
  35. offset_right = 273.0
  36. offset_bottom = 31.0
  37. toggle_mode = true
  38. text = "Listen"
  39. [node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/Signaling"]
  40. offset_left = 277.0
  41. offset_right = 1120.0
  42. offset_bottom = 31.0
  43. size_flags_horizontal = 3
  44. size_flags_vertical = 3
  45. [node name="LinkButton" type="LinkButton" parent="VBoxContainer/Signaling/CenterContainer"]
  46. offset_left = 91.0
  47. offset_top = 4.0
  48. offset_right = 752.0
  49. offset_bottom = 27.0
  50. text = "Make sure to download the GDNative WebRTC Plugin and place it in the project folder"
  51. [node name="Clients" type="GridContainer" parent="VBoxContainer"]
  52. offset_top = 35.0
  53. offset_right = 1120.0
  54. offset_bottom = 626.0
  55. size_flags_horizontal = 3
  56. size_flags_vertical = 3
  57. columns = 2
  58. [node name="ClientUI" parent="VBoxContainer/Clients" instance=ExtResource("2")]
  59. offset_right = 558.0
  60. offset_bottom = 294.0
  61. [node name="ClientUI2" parent="VBoxContainer/Clients" instance=ExtResource("2")]
  62. offset_left = 562.0
  63. offset_right = 1120.0
  64. offset_bottom = 294.0
  65. [node name="ClientUI3" parent="VBoxContainer/Clients" instance=ExtResource("2")]
  66. offset_top = 298.0
  67. offset_right = 558.0
  68. offset_bottom = 591.0
  69. [node name="ClientUI4" parent="VBoxContainer/Clients" instance=ExtResource("2")]
  70. offset_left = 562.0
  71. offset_top = 298.0
  72. offset_right = 1120.0
  73. offset_bottom = 591.0
  74. [node name="Server" type="Node" parent="."]
  75. script = ExtResource("3")
  76. [connection signal="toggled" from="VBoxContainer/Signaling/ListenButton" to="." method="_on_listen_toggled"]
  77. [connection signal="pressed" from="VBoxContainer/Signaling/CenterContainer/LinkButton" to="." method="_on_LinkButton_pressed"]