[gd_scene load_steps=2 format=3 uid="uid://s48rpcadnn47"]

[ext_resource type="Script" path="res://scenes/utils/menus/main/main_menu.gd" id="1_yi7ba"]

[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_yi7ba")

[node name="LevelLoader" type="Node3D" parent="."]

[node name="CurrentLevel" type="Node3D" parent="LevelLoader"]

[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="LevelLoader"]
_spawnable_scenes = PackedStringArray("res://scenes/maps/maps/lowpoly_tdm_2.tscn")
spawn_path = NodePath("../CurrentLevel")
spawn_limit = 1

[node name="UI" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="MainButtons" type="Control" parent="UI"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2

[node name="CreateServer" type="Button" parent="UI/MainButtons"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -4.0
offset_right = 4.0
offset_bottom = 8.0
grow_horizontal = 2
text = "Create Server"

[node name="JoinServer" type="Button" parent="UI/MainButtons"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = 90.0
offset_top = 3.0
offset_right = 203.0
offset_bottom = 34.0
grow_horizontal = 2
text = "Join Server"

[node name="CreateServer" type="Control" parent="UI"]
visible = false
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -512.0
grow_horizontal = 0
grow_vertical = 2

[node name="Maps" type="ItemList" parent="UI/CreateServer"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -214.0
offset_top = -905.0
offset_right = 234.0
offset_bottom = -386.0
grow_horizontal = 2
grow_vertical = 2

[node name="CreateButton" type="Button" parent="UI/CreateServer"]
layout_mode = 0
offset_left = 236.0
offset_top = 643.0
offset_right = 282.0
offset_bottom = 674.0
text = "Start"

[node name="JoinServer" type="Control" parent="UI"]
visible = false
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -567.0
grow_horizontal = 0
grow_vertical = 2

[node name="JoinButton" type="Button" parent="UI/JoinServer"]
layout_mode = 0
offset_left = 205.0
offset_top = 187.0
offset_right = 251.0
offset_bottom = 218.0
text = "Start"

[node name="IP" type="TextEdit" parent="UI/JoinServer"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -240.5
offset_right = 240.5
offset_bottom = 58.0
grow_horizontal = 2
text = "127.0.0.1"

[node name="Port" type="TextEdit" parent="UI/JoinServer"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -230.0
offset_top = 69.0
offset_right = 228.0
offset_bottom = 129.0
grow_horizontal = 2
text = "27015"

[node name="TextEdit" type="TextEdit" parent="UI"]
layout_mode = 1
offset_right = 481.0
offset_bottom = 58.0
text = "Player Name"

[connection signal="pressed" from="UI/MainButtons/CreateServer" to="." method="_on_create_server_pressed"]
[connection signal="pressed" from="UI/MainButtons/JoinServer" to="." method="_on_join_server_pressed"]
[connection signal="pressed" from="UI/CreateServer/CreateButton" to="." method="_on_create_button_pressed"]
[connection signal="pressed" from="UI/JoinServer/JoinButton" to="." method="_on_join_button_pressed"]
[connection signal="text_changed" from="UI/TextEdit" to="." method="_on_text_edit_text_changed"]
