lobby.tscn 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. [gd_scene load_steps=2 format=3 uid="uid://f85s2avde6r4"]
  2. [ext_resource type="Script" path="res://logic/lobby.gd" id="1"]
  3. [node name="Lobby" type="Control"]
  4. layout_mode = 3
  5. anchors_preset = 8
  6. anchor_left = 0.5
  7. anchor_top = 0.5
  8. anchor_right = 0.5
  9. anchor_bottom = 0.5
  10. offset_left = -320.0
  11. offset_top = -200.0
  12. offset_right = 320.0
  13. offset_bottom = 200.0
  14. grow_horizontal = 2
  15. grow_vertical = 2
  16. size_flags_horizontal = 2
  17. size_flags_vertical = 2
  18. [node name="Title" type="Label" parent="."]
  19. layout_mode = 0
  20. offset_left = 210.0
  21. offset_top = 40.0
  22. offset_right = 430.0
  23. offset_bottom = 80.0
  24. size_flags_horizontal = 2
  25. size_flags_vertical = 0
  26. text = "Multiplayer Pong"
  27. [node name="LobbyPanel" type="Panel" parent="."]
  28. layout_mode = 0
  29. offset_left = 210.0
  30. offset_top = 160.0
  31. offset_right = 430.0
  32. offset_bottom = 270.0
  33. size_flags_horizontal = 2
  34. size_flags_vertical = 2
  35. script = ExtResource("1")
  36. [node name="AddressLabel" type="Label" parent="LobbyPanel"]
  37. layout_mode = 0
  38. offset_left = 10.0
  39. offset_top = 10.0
  40. offset_right = 62.0
  41. offset_bottom = 24.0
  42. size_flags_horizontal = 2
  43. size_flags_vertical = 0
  44. text = "Address"
  45. [node name="Address" type="LineEdit" parent="LobbyPanel"]
  46. layout_mode = 0
  47. offset_left = 10.0
  48. offset_top = 30.0
  49. offset_right = 210.0
  50. offset_bottom = 54.0
  51. size_flags_horizontal = 2
  52. size_flags_vertical = 2
  53. text = "127.0.0.1"
  54. [node name="HostButton" type="Button" parent="LobbyPanel"]
  55. layout_mode = 0
  56. offset_left = 10.0
  57. offset_top = 60.0
  58. offset_right = 90.0
  59. offset_bottom = 80.0
  60. size_flags_horizontal = 2
  61. size_flags_vertical = 2
  62. text = "Host"
  63. [node name="JoinButton" type="Button" parent="LobbyPanel"]
  64. layout_mode = 0
  65. offset_left = 130.0
  66. offset_top = 60.0
  67. offset_right = 210.0
  68. offset_bottom = 80.0
  69. size_flags_horizontal = 2
  70. size_flags_vertical = 2
  71. text = "Join"
  72. [node name="StatusOk" type="Label" parent="LobbyPanel"]
  73. layout_mode = 0
  74. offset_left = 10.0
  75. offset_top = 90.0
  76. offset_right = 210.0
  77. offset_bottom = 104.0
  78. size_flags_horizontal = 2
  79. size_flags_vertical = 0
  80. [node name="StatusFail" type="Label" parent="LobbyPanel"]
  81. layout_mode = 0
  82. offset_left = 10.0
  83. offset_top = 90.0
  84. offset_right = 210.0
  85. offset_bottom = 104.0
  86. size_flags_horizontal = 2
  87. size_flags_vertical = 0
  88. [node name="PortForward" type="Label" parent="LobbyPanel"]
  89. visible = false
  90. layout_mode = 0
  91. offset_left = -128.0
  92. offset_top = 136.0
  93. offset_right = 124.0
  94. offset_bottom = 184.0
  95. text = "If you want non-LAN clients to connect,
  96. make sure the port 8910 in UDP
  97. is forwarded checked your router."
  98. [node name="FindPublicIP" type="LinkButton" parent="LobbyPanel"]
  99. visible = false
  100. layout_mode = 0
  101. offset_left = 155.0
  102. offset_top = 152.0
  103. offset_right = 328.0
  104. offset_bottom = 166.0
  105. text = "Find your public IP address"
  106. [connection signal="pressed" from="LobbyPanel/HostButton" to="LobbyPanel" method="_on_host_pressed"]
  107. [connection signal="pressed" from="LobbyPanel/JoinButton" to="LobbyPanel" method="_on_join_pressed"]
  108. [connection signal="pressed" from="LobbyPanel/FindPublicIP" to="LobbyPanel" method="_on_find_public_ip_pressed"]