lobby.tscn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. [gd_scene load_steps=2 format=2]
  2. [ext_resource path="res://lobby.gd" type="Script" id=1]
  3. [node name="Lobby" type="Control"]
  4. anchor_right = 1.0
  5. anchor_bottom = 1.0
  6. size_flags_horizontal = 2
  7. size_flags_vertical = 2
  8. script = ExtResource( 1 )
  9. __meta__ = {
  10. "_edit_use_anchors_": false
  11. }
  12. [node name="Players" type="Panel" parent="."]
  13. visible = false
  14. anchor_left = 0.5
  15. anchor_top = 0.5
  16. anchor_right = 0.5
  17. anchor_bottom = 0.5
  18. margin_left = -126.0
  19. margin_top = -177.5
  20. margin_right = 126.0
  21. margin_bottom = 177.5
  22. size_flags_horizontal = 2
  23. size_flags_vertical = 2
  24. [node name="Label" type="Label" parent="Players"]
  25. margin_left = 26.0
  26. margin_top = 18.0
  27. margin_right = 142.0
  28. margin_bottom = 32.0
  29. size_flags_horizontal = 2
  30. size_flags_vertical = 0
  31. text = "Awaiting Players..."
  32. [node name="Start" type="Button" parent="Players"]
  33. margin_left = 68.0
  34. margin_top = 307.0
  35. margin_right = 193.0
  36. margin_bottom = 336.0
  37. size_flags_horizontal = 2
  38. size_flags_vertical = 2
  39. text = "START!"
  40. [node name="List" type="ItemList" parent="Players"]
  41. margin_left = 25.0
  42. margin_top = 37.0
  43. margin_right = 229.0
  44. margin_bottom = 296.0
  45. size_flags_horizontal = 2
  46. size_flags_vertical = 2
  47. [node name="PortForward" type="Label" parent="Players"]
  48. margin_left = -124.0
  49. margin_top = 375.0
  50. margin_right = 128.0
  51. margin_bottom = 429.0
  52. custom_constants/line_spacing = 6
  53. text = "If you want non-LAN clients to connect,
  54. make sure the port 10567 in UDP
  55. is forwarded on your router."
  56. align = 1
  57. [node name="FindPublicIP" type="LinkButton" parent="Players"]
  58. margin_left = 168.0
  59. margin_top = 393.5
  60. margin_right = 341.0
  61. margin_bottom = 407.5
  62. text = "Find your public IP address"
  63. [node name="Connect" type="Panel" parent="."]
  64. anchor_left = 0.5
  65. anchor_top = 0.5
  66. anchor_right = 0.5
  67. anchor_bottom = 0.5
  68. margin_left = -138.5
  69. margin_top = -83.5
  70. margin_right = 138.5
  71. margin_bottom = 83.5
  72. size_flags_horizontal = 2
  73. size_flags_vertical = 2
  74. [node name="NameLabel" type="Label" parent="Connect"]
  75. margin_left = 14.0
  76. margin_top = 11.0
  77. margin_right = 56.0
  78. margin_bottom = 25.0
  79. size_flags_horizontal = 2
  80. size_flags_vertical = 0
  81. text = "Name:"
  82. [node name="Name" type="LineEdit" parent="Connect"]
  83. margin_left = 17.0
  84. margin_top = 30.0
  85. margin_right = 173.0
  86. margin_bottom = 54.0
  87. size_flags_horizontal = 2
  88. size_flags_vertical = 2
  89. text = "The Warrior"
  90. [node name="IPLabel" type="Label" parent="Connect"]
  91. margin_left = 15.0
  92. margin_top = 66.0
  93. margin_right = 57.0
  94. margin_bottom = 80.0
  95. size_flags_horizontal = 2
  96. size_flags_vertical = 0
  97. text = "IP:"
  98. [node name="IPAddress" type="LineEdit" parent="Connect"]
  99. margin_left = 17.0
  100. margin_top = 85.0
  101. margin_right = 173.0
  102. margin_bottom = 109.0
  103. size_flags_horizontal = 2
  104. size_flags_vertical = 2
  105. text = "127.0.0.1"
  106. [node name="Host" type="Button" parent="Connect"]
  107. margin_left = 181.0
  108. margin_top = 31.0
  109. margin_right = 246.0
  110. margin_bottom = 51.0
  111. size_flags_horizontal = 2
  112. size_flags_vertical = 2
  113. text = "Host"
  114. [node name="Join" type="Button" parent="Connect"]
  115. margin_left = 181.0
  116. margin_top = 87.0
  117. margin_right = 246.0
  118. margin_bottom = 107.0
  119. size_flags_horizontal = 2
  120. size_flags_vertical = 2
  121. text = "Join"
  122. [node name="ErrorLabel" type="Label" parent="Connect"]
  123. margin_left = 15.0
  124. margin_top = 125.0
  125. margin_right = 257.0
  126. margin_bottom = 139.0
  127. size_flags_horizontal = 2
  128. size_flags_vertical = 0
  129. custom_colors/font_color = Color( 0.820312, 0.291595, 0.291595, 1 )
  130. align = 1
  131. [node name="ErrorDialog" type="AcceptDialog" parent="."]
  132. margin_right = 55.0
  133. margin_bottom = 58.0
  134. size_flags_horizontal = 2
  135. size_flags_vertical = 2
  136. [connection signal="pressed" from="Players/Start" to="." method="_on_start_pressed"]
  137. [connection signal="pressed" from="Players/FindPublicIP" to="." method="_on_find_public_ip_pressed"]
  138. [connection signal="pressed" from="Connect/Host" to="." method="_on_host_pressed"]
  139. [connection signal="pressed" from="Connect/Join" to="." method="_on_join_pressed"]