lobby.tscn 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. [gd_scene load_steps=2 format=3 uid="uid://jhdlqsokif5o"]
  2. [ext_resource type="Script" path="res://lobby.gd" id="1"]
  3. [node name="Lobby" type="Control"]
  4. layout_mode = 3
  5. anchors_preset = 15
  6. anchor_right = 1.0
  7. anchor_bottom = 1.0
  8. grow_horizontal = 2
  9. grow_vertical = 2
  10. size_flags_horizontal = 2
  11. size_flags_vertical = 2
  12. script = ExtResource("1")
  13. [node name="Players" type="Panel" parent="."]
  14. visible = false
  15. layout_mode = 1
  16. anchors_preset = 8
  17. anchor_left = 0.5
  18. anchor_top = 0.5
  19. anchor_right = 0.5
  20. anchor_bottom = 0.5
  21. offset_left = -126.0
  22. offset_top = -177.5
  23. offset_right = 126.0
  24. offset_bottom = 177.5
  25. grow_horizontal = 2
  26. grow_vertical = 2
  27. size_flags_horizontal = 2
  28. size_flags_vertical = 2
  29. [node name="Label" type="Label" parent="Players"]
  30. layout_mode = 0
  31. offset_left = 26.0
  32. offset_top = 7.0
  33. offset_right = 229.0
  34. offset_bottom = 30.0
  35. size_flags_horizontal = 2
  36. size_flags_vertical = 0
  37. text = "Awaiting Players..."
  38. horizontal_alignment = 1
  39. [node name="Start" type="Button" parent="Players"]
  40. layout_mode = 0
  41. offset_left = 68.0
  42. offset_top = 307.0
  43. offset_right = 193.0
  44. offset_bottom = 336.0
  45. size_flags_horizontal = 2
  46. size_flags_vertical = 2
  47. text = "START!"
  48. [node name="List" type="ItemList" parent="Players"]
  49. layout_mode = 0
  50. offset_left = 25.0
  51. offset_top = 37.0
  52. offset_right = 229.0
  53. offset_bottom = 296.0
  54. size_flags_horizontal = 2
  55. size_flags_vertical = 2
  56. [node name="PortForward" type="Label" parent="Players"]
  57. layout_mode = 0
  58. offset_left = -124.0
  59. offset_top = 375.0
  60. offset_right = 128.0
  61. offset_bottom = 429.0
  62. theme_override_constants/line_spacing = 6
  63. text = "If you want non-LAN clients to connect,
  64. make sure the port 10567 in UDP
  65. is forwarded on your router."
  66. [node name="FindPublicIP" type="LinkButton" parent="Players"]
  67. layout_mode = 0
  68. offset_left = 200.0
  69. offset_top = 409.5
  70. offset_right = 408.0
  71. offset_bottom = 432.5
  72. text = "Find your public IP address"
  73. [node name="Connect" type="Panel" parent="."]
  74. layout_mode = 1
  75. anchors_preset = 8
  76. anchor_left = 0.5
  77. anchor_top = 0.5
  78. anchor_right = 0.5
  79. anchor_bottom = 0.5
  80. offset_left = -138.5
  81. offset_top = -83.5
  82. offset_right = 138.5
  83. offset_bottom = 83.5
  84. grow_horizontal = 2
  85. grow_vertical = 2
  86. size_flags_horizontal = 2
  87. size_flags_vertical = 2
  88. [node name="NameLabel" type="Label" parent="Connect"]
  89. layout_mode = 0
  90. offset_left = 14.0
  91. offset_top = 11.0
  92. offset_right = 56.0
  93. offset_bottom = 25.0
  94. size_flags_horizontal = 2
  95. size_flags_vertical = 0
  96. text = "Name:"
  97. [node name="Name" type="LineEdit" parent="Connect"]
  98. layout_mode = 0
  99. offset_left = 17.0
  100. offset_top = 38.0
  101. offset_right = 173.0
  102. offset_bottom = 69.0
  103. size_flags_horizontal = 2
  104. size_flags_vertical = 2
  105. text = "The Warrior"
  106. [node name="IPLabel" type="Label" parent="Connect"]
  107. layout_mode = 0
  108. offset_left = 15.0
  109. offset_top = 74.0
  110. offset_right = 57.0
  111. offset_bottom = 97.0
  112. size_flags_horizontal = 2
  113. size_flags_vertical = 0
  114. theme_override_font_sizes/font_size = 16
  115. text = "IP:"
  116. [node name="IPAddress" type="LineEdit" parent="Connect"]
  117. layout_mode = 0
  118. offset_left = 17.0
  119. offset_top = 102.0
  120. offset_right = 173.0
  121. offset_bottom = 133.0
  122. size_flags_horizontal = 2
  123. size_flags_vertical = 2
  124. text = "127.0.0.1"
  125. [node name="Host" type="Button" parent="Connect"]
  126. layout_mode = 0
  127. offset_left = 181.0
  128. offset_top = 38.0
  129. offset_right = 246.0
  130. offset_bottom = 69.0
  131. size_flags_horizontal = 2
  132. size_flags_vertical = 2
  133. text = "Host"
  134. [node name="Join" type="Button" parent="Connect"]
  135. layout_mode = 0
  136. offset_left = 181.0
  137. offset_top = 102.0
  138. offset_right = 246.0
  139. offset_bottom = 133.0
  140. size_flags_horizontal = 2
  141. size_flags_vertical = 2
  142. text = "Join"
  143. [node name="ErrorLabel" type="Label" parent="Connect"]
  144. layout_mode = 0
  145. offset_left = 15.0
  146. offset_top = 138.0
  147. offset_right = 257.0
  148. offset_bottom = 161.0
  149. size_flags_horizontal = 2
  150. size_flags_vertical = 0
  151. theme_override_colors/font_color = Color(0.820312, 0.291595, 0.291595, 1)
  152. [node name="ErrorDialog" type="AcceptDialog" parent="."]
  153. [connection signal="pressed" from="Players/Start" to="." method="_on_start_pressed"]
  154. [connection signal="pressed" from="Players/FindPublicIP" to="." method="_on_find_public_ip_pressed"]
  155. [connection signal="pressed" from="Connect/Host" to="." method="_on_host_pressed"]
  156. [connection signal="pressed" from="Connect/Join" to="." method="_on_join_pressed"]