[gd_scene load_steps=13 format=2]

[ext_resource path="res://Scenes/Menu.gd" type="Script" id=1]
[ext_resource path="res://Graphics/UI/Background.shader" type="Shader" id=2]
[ext_resource path="res://Graphics/UI/logo-temp-pixel.png" type="Texture" id=3]
[ext_resource path="res://Graphics/UI/ui_theme.tres" type="Theme" id=4]
[ext_resource path="res://Graphics/UI/iosevka-aile-regular.ttf" type="DynamicFontData" id=5]

[sub_resource type="ViewportTexture" id=1]
viewport_path = NodePath("Viewport")

[sub_resource type="Shader" id=2]
code = "shader_type canvas_item;

void fragment() {
	vec4 tex = texture(TEXTURE, UV);
	COLOR = vec4(tex.rgb * 0., tex.a * 0.5);
}"

[sub_resource type="ShaderMaterial" id=3]
shader = SubResource( 2 )

[sub_resource type="ShaderMaterial" id=4]
shader = ExtResource( 2 )
shader_param/speed = 0.001
shader_param/zoom = 0.8

[sub_resource type="StyleBoxFlat" id=5]
content_margin_left = 16.0
content_margin_right = 16.0
content_margin_top = 20.0
content_margin_bottom = 20.0
bg_color = Color( 0.133333, 0.12549, 0.203922, 0.784314 )
border_width_left = 4
border_width_top = 4
border_width_right = 4
border_width_bottom = 4
border_color = Color( 0.27451, 0.415686, 0.984314, 0.392157 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4

[sub_resource type="DynamicFont" id=6]
size = 20
extra_spacing_top = 5
extra_spacing_bottom = 5
font_data = ExtResource( 5 )

[sub_resource type="DynamicFont" id=7]
size = 20
extra_spacing_top = 10
extra_spacing_bottom = 10
font_data = ExtResource( 5 )

[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Background" type="TextureRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
texture = SubResource( 1 )
stretch_mode = 7
__meta__ = {
"_edit_use_anchors_": false
}

[node name="logo-temp2" type="TextureRect" parent="."]
material = SubResource( 3 )
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -248.771
margin_top = -295.282
margin_right = -8.77124
margin_bottom = -115.282
grow_horizontal = 2
grow_vertical = 2
rect_scale = Vector2( 2, 2 )
texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="logo-temp" type="TextureRect" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -250.58
margin_top = -296.523
margin_right = -10.5796
margin_bottom = -116.523
grow_horizontal = 2
grow_vertical = 2
rect_scale = Vector2( 2, 2 )
texture = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Viewport" type="Viewport" parent="."]
size = Vector2( 300, 300 )

[node name="ColorRect" type="ColorRect" parent="Viewport"]
material = SubResource( 4 )
anchor_right = 1.0
anchor_bottom = 1.0

[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 100.0
margin_top = -300.0
margin_right = -100.0
margin_bottom = -50.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
margin_left = 390.0
margin_top = 35.0
margin_right = 690.0
margin_bottom = 215.0
rect_min_size = Vector2( 300, 0 )
custom_styles/panel = SubResource( 5 )

[node name="HBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer"]
margin_left = 16.0
margin_top = 20.0
margin_right = 284.0
margin_bottom = 160.0
custom_constants/separation = 10

[node name="HostButton" type="Button" parent="CenterContainer/PanelContainer/HBoxContainer"]
margin_right = 268.0
margin_bottom = 42.0
theme = ExtResource( 4 )
custom_fonts/font = SubResource( 6 )
text = "Start a new game"

[node name="Label" type="Label" parent="CenterContainer/PanelContainer/HBoxContainer"]
margin_top = 52.0
margin_right = 268.0
margin_bottom = 88.0
theme = ExtResource( 4 )
custom_fonts/font = SubResource( 6 )
text = "or"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="JoinButton" type="Button" parent="CenterContainer/PanelContainer/HBoxContainer"]
margin_top = 98.0
margin_right = 268.0
margin_bottom = 140.0
theme = ExtResource( 4 )
custom_fonts/font = SubResource( 6 )
text = "Join an existing game"

[node name="Popup" type="PopupDialog" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 100.0
margin_top = 100.0
margin_right = -100.0
margin_bottom = -100.0
custom_styles/panel = SubResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="MarginContainer" type="MarginContainer" parent="Popup"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 20.0
margin_top = 20.0
margin_right = -20.0
margin_bottom = -20.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VBoxContainer" type="VBoxContainer" parent="Popup/MarginContainer"]
margin_right = 1040.0
margin_bottom = 560.0
custom_constants/separation = 5
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="Popup/MarginContainer/VBoxContainer"]
margin_right = 1040.0
margin_bottom = 36.0
custom_fonts/font = SubResource( 6 )
text = "Server Browser"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ItemList" type="ItemList" parent="Popup/MarginContainer/VBoxContainer"]
margin_top = 41.0
margin_right = 1040.0
margin_bottom = 468.0
size_flags_vertical = 3
custom_fonts/font = SubResource( 7 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label2" type="Label" parent="Popup/MarginContainer/VBoxContainer"]
margin_top = 473.0
margin_right = 1040.0
margin_bottom = 509.0
custom_fonts/font = SubResource( 6 )
text = "Join by IP/address"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="HBoxContainer" type="HBoxContainer" parent="Popup/MarginContainer/VBoxContainer"]
margin_top = 514.0
margin_right = 1040.0
margin_bottom = 560.0
size_flags_horizontal = 3
custom_constants/separation = 10

[node name="LineEdit" type="LineEdit" parent="Popup/MarginContainer/VBoxContainer/HBoxContainer"]
margin_right = 300.0
margin_bottom = 46.0
rect_min_size = Vector2( 300, 0 )
custom_fonts/font = SubResource( 6 )
placeholder_text = "server.address"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Button" type="Button" parent="Popup/MarginContainer/VBoxContainer/HBoxContainer"]
margin_left = 310.0
margin_right = 410.0
margin_bottom = 46.0
rect_min_size = Vector2( 100, 0 )
theme = ExtResource( 4 )
custom_fonts/font = SubResource( 6 )
disabled = true
text = "Join"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="pressed" from="CenterContainer/PanelContainer/HBoxContainer/HostButton" to="." method="_host_pressed"]
[connection signal="pressed" from="CenterContainer/PanelContainer/HBoxContainer/JoinButton" to="." method="_join_pressed"]
[connection signal="item_activated" from="Popup/MarginContainer/VBoxContainer/ItemList" to="." method="_server_item_clicked"]
[connection signal="text_changed" from="Popup/MarginContainer/VBoxContainer/HBoxContainer/LineEdit" to="." method="_server_addr_changed"]
[connection signal="pressed" from="Popup/MarginContainer/VBoxContainer/HBoxContainer/Button" to="." method="_manual_join_pressed"]
