lobby.tscn 2.9 KB

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