main.tscn 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. [gd_scene load_steps=3 format=3 uid="uid://c240icwf4uov8"]
  2. [ext_resource type="Script" path="res://script/main.gd" id="1"]
  3. [ext_resource type="PackedScene" path="res://scene/game.tscn" id="2"]
  4. [node name="Main" type="Control"]
  5. layout_mode = 3
  6. anchors_preset = 15
  7. anchor_right = 1.0
  8. anchor_bottom = 1.0
  9. grow_horizontal = 2
  10. grow_vertical = 2
  11. size_flags_horizontal = 3
  12. size_flags_vertical = 3
  13. script = ExtResource("1")
  14. [node name="Panel" type="Panel" parent="."]
  15. anchors_preset = 15
  16. anchor_right = 1.0
  17. anchor_bottom = 1.0
  18. grow_horizontal = 2
  19. grow_vertical = 2
  20. [node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
  21. anchors_preset = 15
  22. anchor_right = 1.0
  23. anchor_bottom = 1.0
  24. offset_left = 20.0
  25. offset_top = 20.0
  26. offset_right = -20.0
  27. offset_bottom = -20.0
  28. grow_horizontal = 2
  29. grow_vertical = 2
  30. [node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
  31. offset_right = 1112.0
  32. offset_bottom = 31.0
  33. [node name="Label" type="Label" parent="Panel/VBoxContainer/HBoxContainer"]
  34. offset_top = 2.0
  35. offset_right = 369.0
  36. offset_bottom = 28.0
  37. size_flags_horizontal = 3
  38. text = "Name"
  39. [node name="NameEdit" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer"]
  40. offset_left = 373.0
  41. offset_right = 1112.0
  42. offset_bottom = 31.0
  43. size_flags_horizontal = 3
  44. size_flags_stretch_ratio = 2.0
  45. text = "A Godot User"
  46. [node name="HBoxContainer2" type="HBoxContainer" parent="Panel/VBoxContainer"]
  47. offset_top = 35.0
  48. offset_right = 1112.0
  49. offset_bottom = 66.0
  50. [node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer/HBoxContainer2"]
  51. offset_right = 369.0
  52. offset_bottom = 31.0
  53. size_flags_horizontal = 3
  54. [node name="Host" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  55. offset_right = 44.0
  56. offset_bottom = 31.0
  57. text = "Host"
  58. [node name="Control" type="Control" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  59. layout_mode = 3
  60. anchors_preset = 0
  61. offset_left = 48.0
  62. offset_right = 273.0
  63. offset_bottom = 31.0
  64. size_flags_horizontal = 3
  65. [node name="Connect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  66. offset_left = 277.0
  67. offset_right = 369.0
  68. offset_bottom = 31.0
  69. text = "Connect to"
  70. [node name="Disconnect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  71. visible = false
  72. offset_left = 68.0
  73. offset_right = 152.0
  74. offset_bottom = 24.0
  75. text = "Disconnect"
  76. [node name="Hostname" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer2"]
  77. offset_left = 373.0
  78. offset_right = 1112.0
  79. offset_bottom = 31.0
  80. size_flags_horizontal = 3
  81. size_flags_stretch_ratio = 2.0
  82. text = "localhost"
  83. placeholder_text = "localhost"
  84. [node name="Control" type="Control" parent="Panel/VBoxContainer"]
  85. layout_mode = 3
  86. anchors_preset = 0
  87. offset_top = 70.0
  88. offset_right = 1112.0
  89. offset_bottom = 70.0
  90. [node name="Game" parent="Panel/VBoxContainer" instance=ExtResource("2")]
  91. layout_mode = 3
  92. anchors_preset = 0
  93. anchor_right = 0.0
  94. anchor_bottom = 0.0
  95. offset_top = 74.0
  96. offset_right = 1112.0
  97. offset_bottom = 608.0
  98. [node name="AcceptDialog" type="AcceptDialog" parent="."]
  99. dialog_text = "Connection closed"
  100. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Host" to="." method="_on_Host_pressed"]
  101. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Connect" to="." method="_on_Connect_pressed"]
  102. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Disconnect" to="." method="_on_Disconnect_pressed"]