[gd_scene load_steps=8 format=3 uid="uid://bwjft0rlj2tu2"]

[ext_resource type="Script" uid="uid://dnccsu4wgp1pk" path="res://sources/menus/language_selection/package_downloader.gd" id="1_awls2"]
[ext_resource type="PackedScene" uid="uid://wdjp1sv55q4f" path="res://sources/menus/components/night_sky/night_sky.tscn" id="2_ntm5g"]
[ext_resource type="FontFile" uid="uid://bw8cb4e0a7ayj" path="res://assets/fonts/kalulu_mulish_regular.otf" id="3_1msln"]
[ext_resource type="LabelSettings" uid="uid://ohvlqccl2oog" path="res://resources/themes/error_label_settings.tres" id="4_03o13"]
[ext_resource type="Script" uid="uid://58twmknv6bl5" path="res://sources/ui/popup.gd" id="5_dyine"]

[sub_resource type="Gradient" id="Gradient_22q4u"]
colors = PackedColorArray(0.2, 0.2, 0.2, 0.505882, 0.2, 0.2, 0.2, 0.505882)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_ymust"]
gradient = SubResource("Gradient_22q4u")

[node name="LocalPackageDownloader" 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_awls2")

[node name="HTTPRequest" type="HTTPRequest" parent="."]

[node name="Background" parent="." instance=ExtResource("2_ntm5g")]
layout_mode = 1

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 400
theme_override_constants/margin_top = 600
theme_override_constants/margin_right = 400
theme_override_constants/margin_bottom = 600

[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
layout_mode = 2
theme_type_variation = &"PanelKalulu"

[node name="QuestionContainer" type="MarginContainer" parent="MarginContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 25
theme_override_constants/margin_top = 25
theme_override_constants/margin_right = 25
theme_override_constants/margin_bottom = 25

[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/QuestionContainer"]
layout_mode = 2

[node name="CheckingLabel" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 90
text = "CHECKING_DATA"
horizontal_alignment = 1
vertical_alignment = 1

[node name="DownloadLabel" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 90
text = "DOWNLOADING_DATA"
horizontal_alignment = 1
vertical_alignment = 1

[node name="CopyLabel" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 3
theme_override_font_sizes/font_size = 90
text = "EXTRACTING_DATA"
horizontal_alignment = 1
vertical_alignment = 1

[node name="DownloadProgressBar" type="ProgressBar" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(800, 100)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_1msln")
theme_override_font_sizes/font_size = 60
max_value = 1.0
step = 1.0

[node name="DownloadInfo" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
clip_text = true

[node name="ExtractProgressBar" type="ProgressBar" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(800, 100)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_1msln")
theme_override_font_sizes/font_size = 60
max_value = 1.0
step = 1.0

[node name="ExtractInfo" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
clip_text = true

[node name="ErrorLabel" type="Label" parent="MarginContainer/PanelContainer/QuestionContainer/VBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
text = "ERROR_DOWNLOADING"
label_settings = ExtResource("4_03o13")

[node name="ErrorPopup" type="CanvasLayer" parent="."]
visible = false
script = ExtResource("5_dyine")
content_text = "DISCONNECTED_ERROR"

[node name="TextureRect" type="TextureRect" parent="ErrorPopup"]
top_level = true
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0
texture = SubResource("GradientTexture1D_ymust")

[node name="PanelContainer" type="PanelContainer" parent="ErrorPopup/TextureRect"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
theme_type_variation = &"PanelKalulu"

[node name="VBoxContainer" type="VBoxContainer" parent="ErrorPopup/TextureRect/PanelContainer"]
layout_mode = 2

[node name="MarginContainer" type="MarginContainer" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 25

[node name="VBoxContainer" type="VBoxContainer" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 20

[node name="ContentLabel" type="Label" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(1000, 0)
layout_mode = 2
size_flags_vertical = 1
theme_override_font_sizes/font_size = 70
text = "DISCONNECTED_ERROR"
autowrap_mode = 2

[node name="HBoxContainer" type="HBoxContainer" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2

[node name="ConfirmButton" type="Button" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "RETURN_TO_MAIN_MENU"

[node name="Separator" type="Control" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="CancelButton" type="Button" parent="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
theme_override_font_sizes/font_size = 70
text = "CANCEL"

[connection signal="request_completed" from="HTTPRequest" to="." method="_on_http_request_request_completed"]
[connection signal="accepted" from="ErrorPopup" to="." method="_on_disconnected_popup_accepted"]
[connection signal="pressed" from="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/ConfirmButton" to="ErrorPopup" method="_on_confirm_button_pressed"]
[connection signal="pressed" from="ErrorPopup/TextureRect/PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/CancelButton" to="ErrorPopup" method="_on_cancel_button_pressed"]
