lobby.tscn 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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 = 18.0
  33. offset_right = 142.0
  34. offset_bottom = 32.0
  35. size_flags_horizontal = 2
  36. size_flags_vertical = 0
  37. text = "Awaiting Players..."
  38. [node name="Start" type="Button" parent="Players"]
  39. layout_mode = 0
  40. offset_left = 68.0
  41. offset_top = 307.0
  42. offset_right = 193.0
  43. offset_bottom = 336.0
  44. size_flags_horizontal = 2
  45. size_flags_vertical = 2
  46. text = "START!"
  47. [node name="List" type="ItemList" parent="Players"]
  48. layout_mode = 0
  49. offset_left = 25.0
  50. offset_top = 37.0
  51. offset_right = 229.0
  52. offset_bottom = 296.0
  53. size_flags_horizontal = 2
  54. size_flags_vertical = 2
  55. [node name="PortForward" type="Label" parent="Players"]
  56. layout_mode = 0
  57. offset_left = -124.0
  58. offset_top = 375.0
  59. offset_right = 128.0
  60. offset_bottom = 429.0
  61. theme_override_constants/line_spacing = 6
  62. text = "If you want non-LAN clients to connect,
  63. make sure the port 10567 in UDP
  64. is forwarded on your router."
  65. [node name="FindPublicIP" type="LinkButton" parent="Players"]
  66. layout_mode = 0
  67. offset_left = 168.0
  68. offset_top = 393.5
  69. offset_right = 341.0
  70. offset_bottom = 407.5
  71. text = "Find your public IP address"
  72. [node name="Connect" type="Panel" parent="."]
  73. layout_mode = 1
  74. anchors_preset = 8
  75. anchor_left = 0.5
  76. anchor_top = 0.5
  77. anchor_right = 0.5
  78. anchor_bottom = 0.5
  79. offset_left = -138.5
  80. offset_top = -83.5
  81. offset_right = 138.5
  82. offset_bottom = 83.5
  83. grow_horizontal = 2
  84. grow_vertical = 2
  85. size_flags_horizontal = 2
  86. size_flags_vertical = 2
  87. [node name="NameLabel" type="Label" parent="Connect"]
  88. layout_mode = 0
  89. offset_left = 14.0
  90. offset_top = 11.0
  91. offset_right = 56.0
  92. offset_bottom = 25.0
  93. size_flags_horizontal = 2
  94. size_flags_vertical = 0
  95. text = "Name:"
  96. [node name="Name" type="LineEdit" parent="Connect"]
  97. layout_mode = 0
  98. offset_left = 17.0
  99. offset_top = 30.0
  100. offset_right = 173.0
  101. offset_bottom = 54.0
  102. size_flags_horizontal = 2
  103. size_flags_vertical = 2
  104. text = "The Warrior"
  105. [node name="IPLabel" type="Label" parent="Connect"]
  106. layout_mode = 0
  107. offset_left = 15.0
  108. offset_top = 66.0
  109. offset_right = 57.0
  110. offset_bottom = 80.0
  111. size_flags_horizontal = 2
  112. size_flags_vertical = 0
  113. theme_override_font_sizes/font_size = 16
  114. text = "IP:"
  115. [node name="IPAddress" type="LineEdit" parent="Connect"]
  116. layout_mode = 0
  117. offset_left = 17.0
  118. offset_top = 85.0
  119. offset_right = 173.0
  120. offset_bottom = 109.0
  121. size_flags_horizontal = 2
  122. size_flags_vertical = 2
  123. text = "127.0.0.1"
  124. [node name="Host" type="Button" parent="Connect"]
  125. layout_mode = 0
  126. offset_left = 181.0
  127. offset_top = 31.0
  128. offset_right = 246.0
  129. offset_bottom = 51.0
  130. size_flags_horizontal = 2
  131. size_flags_vertical = 2
  132. text = "Host"
  133. [node name="Join" type="Button" parent="Connect"]
  134. layout_mode = 0
  135. offset_left = 181.0
  136. offset_top = 87.0
  137. offset_right = 246.0
  138. offset_bottom = 107.0
  139. size_flags_horizontal = 2
  140. size_flags_vertical = 2
  141. text = "Join"
  142. [node name="ErrorLabel" type="Label" parent="Connect"]
  143. layout_mode = 0
  144. offset_left = 15.0
  145. offset_top = 125.0
  146. offset_right = 257.0
  147. offset_bottom = 139.0
  148. size_flags_horizontal = 2
  149. size_flags_vertical = 0
  150. theme_override_colors/font_color = Color(0.820312, 0.291595, 0.291595, 1)
  151. [node name="ErrorDialog" type="AcceptDialog" parent="."]
  152. [connection signal="pressed" from="Players/Start" to="." method="_on_start_pressed"]
  153. [connection signal="pressed" from="Players/FindPublicIP" to="." method="_on_find_public_ip_pressed"]
  154. [connection signal="pressed" from="Connect/Host" to="." method="_on_host_pressed"]
  155. [connection signal="pressed" from="Connect/Join" to="." method="_on_join_pressed"]