main.tscn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://script/main.gd" type="Script" id=1]
  3. [ext_resource path="res://scene/game.tscn" type="PackedScene" id=2]
  4. [node name="Main" type="Control"]
  5. anchor_right = 1.0
  6. anchor_bottom = 1.0
  7. script = ExtResource( 1 )
  8. __meta__ = {
  9. "_edit_use_anchors_": false
  10. }
  11. [node name="Panel" type="Panel" parent="."]
  12. anchor_right = 1.0
  13. anchor_bottom = 1.0
  14. [node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
  15. anchor_right = 1.0
  16. anchor_bottom = 1.0
  17. margin_left = 20.0
  18. margin_top = 20.0
  19. margin_right = -20.0
  20. margin_bottom = -20.0
  21. [node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
  22. margin_right = 984.0
  23. margin_bottom = 24.0
  24. [node name="Label" type="Label" parent="Panel/VBoxContainer/HBoxContainer"]
  25. margin_top = 5.0
  26. margin_right = 326.0
  27. margin_bottom = 19.0
  28. size_flags_horizontal = 3
  29. text = "Name"
  30. [node name="NameEdit" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer"]
  31. margin_left = 330.0
  32. margin_right = 984.0
  33. margin_bottom = 24.0
  34. size_flags_horizontal = 3
  35. size_flags_stretch_ratio = 2.0
  36. text = "A Godot User"
  37. [node name="HBoxContainer2" type="HBoxContainer" parent="Panel/VBoxContainer"]
  38. margin_top = 28.0
  39. margin_right = 984.0
  40. margin_bottom = 52.0
  41. [node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer/HBoxContainer2"]
  42. margin_right = 326.0
  43. margin_bottom = 24.0
  44. size_flags_horizontal = 3
  45. [node name="Host" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  46. margin_right = 42.0
  47. margin_bottom = 24.0
  48. text = "Host"
  49. [node name="Control" type="Control" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  50. margin_left = 46.0
  51. margin_right = 241.0
  52. margin_bottom = 24.0
  53. size_flags_horizontal = 3
  54. [node name="Connect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  55. margin_left = 245.0
  56. margin_right = 326.0
  57. margin_bottom = 24.0
  58. text = "Connect to"
  59. [node name="Disconnect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  60. visible = false
  61. margin_left = 68.0
  62. margin_right = 152.0
  63. margin_bottom = 24.0
  64. text = "Disconnect"
  65. [node name="Hostname" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer2"]
  66. margin_left = 330.0
  67. margin_right = 984.0
  68. margin_bottom = 24.0
  69. size_flags_horizontal = 3
  70. size_flags_stretch_ratio = 2.0
  71. text = "localhost"
  72. placeholder_text = "localhost"
  73. [node name="Control" type="Control" parent="Panel/VBoxContainer"]
  74. margin_top = 56.0
  75. margin_right = 984.0
  76. margin_bottom = 76.0
  77. rect_min_size = Vector2( 0, 20 )
  78. [node name="Game" parent="Panel/VBoxContainer" instance=ExtResource( 2 )]
  79. anchor_right = 0.0
  80. anchor_bottom = 0.0
  81. margin_top = 80.0
  82. margin_right = 984.0
  83. margin_bottom = 560.0
  84. [node name="AcceptDialog" type="AcceptDialog" parent="."]
  85. anchor_left = 0.5
  86. anchor_top = 0.5
  87. anchor_right = 0.5
  88. anchor_bottom = 0.5
  89. margin_left = -200.0
  90. margin_top = -100.0
  91. margin_right = 200.0
  92. margin_bottom = 100.0
  93. dialog_text = "Connection closed"
  94. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Host" to="." method="_on_Host_pressed"]
  95. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Connect" to="." method="_on_Connect_pressed"]
  96. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Disconnect" to="." method="_on_Disconnect_pressed"]