main.tscn 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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" uid="uid://dqxum77awcw6u" 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. layout_mode = 0
  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. layout_mode = 0
  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. layout_mode = 2
  32. [node name="Label" type="Label" parent="Panel/VBoxContainer/HBoxContainer"]
  33. layout_mode = 2
  34. size_flags_horizontal = 3
  35. text = "Name"
  36. [node name="NameEdit" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer"]
  37. layout_mode = 2
  38. size_flags_horizontal = 3
  39. size_flags_stretch_ratio = 2.0
  40. text = "A Godot User"
  41. [node name="HBoxContainer2" type="HBoxContainer" parent="Panel/VBoxContainer"]
  42. layout_mode = 2
  43. [node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer/HBoxContainer2"]
  44. layout_mode = 2
  45. size_flags_horizontal = 3
  46. [node name="Host" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  47. layout_mode = 2
  48. text = "Host"
  49. [node name="Control" type="Control" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  50. layout_mode = 2
  51. size_flags_horizontal = 3
  52. [node name="Connect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  53. layout_mode = 2
  54. text = "Connect to"
  55. [node name="Disconnect" type="Button" parent="Panel/VBoxContainer/HBoxContainer2/HBoxContainer"]
  56. visible = false
  57. layout_mode = 2
  58. text = "Disconnect"
  59. [node name="Hostname" type="LineEdit" parent="Panel/VBoxContainer/HBoxContainer2"]
  60. layout_mode = 2
  61. size_flags_horizontal = 3
  62. size_flags_stretch_ratio = 2.0
  63. text = "localhost"
  64. placeholder_text = "localhost"
  65. [node name="Control" type="Control" parent="Panel/VBoxContainer"]
  66. layout_mode = 2
  67. [node name="Game" parent="Panel/VBoxContainer" instance=ExtResource("2")]
  68. layout_mode = 2
  69. [node name="AcceptDialog" type="AcceptDialog" parent="."]
  70. dialog_text = "Connection closed"
  71. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Host" to="." method="_on_Host_pressed"]
  72. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Connect" to="." method="_on_Connect_pressed"]
  73. [connection signal="pressed" from="Panel/VBoxContainer/HBoxContainer2/HBoxContainer/Disconnect" to="." method="_on_Disconnect_pressed"]