fixed the results menuu persisting to the title screen in ANN

This commit is contained in:
JoeMama
2025-10-10 11:41:22 +01:00
parent 57a659ba34
commit 01238a0f1c
3 changed files with 90 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=83 format=3 uid="uid://bgeh6ex0lbqfq"]
[gd_scene load_steps=84 format=3 uid="uid://bgeh6ex0lbqfq"]
[ext_resource type="Script" uid="uid://b3stoe2kp1nv1" path="res://Scripts/UI/Credits.gd" id="1_db8c5"]
[ext_resource type="AudioStream" uid="uid://cdhsj02wqdt7y" path="res://Assets/Audio/BGM/Credits.mp3" id="1_k57dj"]
@@ -10,6 +10,7 @@
[ext_resource type="Texture2D" uid="uid://bn3mqsvovdtbx" path="res://Assets/Sprites/UI/CreditsDioramas/4.png" id="8_3648a"]
[ext_resource type="Texture2D" uid="uid://deooy8040yx2u" path="res://Assets/Sprites/UI/LocaleFlags.png" id="8_oqk7k"]
[ext_resource type="Texture2D" uid="uid://cble1pod2v3gd" path="res://Assets/Sprites/UI/CreditsDioramas/5.png" id="9_shsp7"]
[ext_resource type="Script" uid="uid://ca3bew33g45eq" path="res://Scripts/Classes/UI/PackTextureRect.gd" id="11_d4vu4"]
[ext_resource type="Texture2D" uid="uid://dgu0hgrwsu5jk" path="res://Assets/Sprites/UI/CreditsDioramas/6.png" id="11_kpq8t"]
[ext_resource type="Texture2D" uid="uid://c8xmws8kj7dtd" path="res://Assets/Sprites/UI/CreditsDioramas/7.png" id="12_oe1k8"]
[ext_resource type="Texture2D" uid="uid://c8bg7co8ic1mm" path="res://Assets/Sprites/UI/CreditsDioramas/9.png" id="13_17gvw"]
@@ -1244,6 +1245,8 @@ offset_top = 8.0
offset_right = 248.0
offset_bottom = 120.0
texture = ExtResource("9_shsp7")
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label3" type="Label" parent="Labels/Sound"]
layout_mode = 0
@@ -1283,6 +1286,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_o2gfq")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label3" type="Label" parent="Labels/Sound/Label3"]
layout_mode = 0
@@ -1302,6 +1307,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_wkf2d")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Localizers" type="Control" parent="Labels"]
visible = false
@@ -1352,6 +1359,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_g72p5")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label2/TextureRect"]
layout_mode = 1
@@ -1382,6 +1391,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_mwo1j")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label3/TextureRect"]
layout_mode = 1
@@ -1412,6 +1423,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_oe1k8")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label4/TextureRect"]
layout_mode = 1
@@ -1442,6 +1455,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_sqdyg")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label5/TextureRect"]
layout_mode = 1
@@ -1472,6 +1487,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_x745s")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label6/TextureRect"]
layout_mode = 1
@@ -1502,6 +1519,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_0ixvh")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label7/TextureRect"]
layout_mode = 1
@@ -1532,6 +1551,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_uea8q")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label8/TextureRect"]
layout_mode = 1
@@ -1562,6 +1583,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_kd4b0")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label9/TextureRect"]
layout_mode = 1
@@ -1592,6 +1615,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_tbk6s")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label10/TextureRect"]
layout_mode = 1
@@ -1622,6 +1647,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_ipar5")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label11/TextureRect"]
layout_mode = 1
@@ -1652,6 +1679,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_c51sb")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label12/TextureRect"]
layout_mode = 1
@@ -1682,6 +1711,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_uw0vd")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect2" type="TextureRect" parent="Labels/Localizers/Label/Label13/TextureRect"]
layout_mode = 1
@@ -1701,6 +1732,8 @@ offset_top = 8.0
offset_right = 248.0
offset_bottom = 120.0
texture = ExtResource("11_kpq8t")
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="BetaTesters" type="Control" parent="Labels"]
visible = false
@@ -1752,6 +1785,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_wi5il")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label3" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1771,6 +1806,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_mysjn")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label4" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1790,6 +1827,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_iq5ck")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label5" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1809,6 +1848,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_g8vsx")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label6" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1828,6 +1869,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_rtb0f")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label7" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1847,6 +1890,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_j783k")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label8" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1866,6 +1911,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_2q3a5")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label9" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1885,6 +1932,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_8ybgs")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label12" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1904,6 +1953,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_gclpm")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label14" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1923,6 +1974,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_knejk")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label13" type="Label" parent="Labels/BetaTesters/Label"]
layout_mode = 0
@@ -1942,6 +1995,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_bwa3s")
expand_mode = 1
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect" type="TextureRect" parent="Labels/BetaTesters"]
layout_mode = 0
@@ -1950,6 +2005,8 @@ offset_top = 32.0
offset_right = 248.0
offset_bottom = 144.0
texture = ExtResource("12_oe1k8")
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label2" type="Label" parent="Labels/BetaTesters"]
layout_mode = 0
@@ -1970,6 +2027,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_ml8dk")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label3" type="Label" parent="Labels/BetaTesters"]
layout_mode = 0
@@ -1990,6 +2049,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_tm746")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="BetaTesters2" type="Control" parent="Labels"]
visible = false
@@ -2041,6 +2102,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_t8m53")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label5" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2060,6 +2123,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_1n3p2")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label6" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2078,6 +2143,8 @@ offset_right = 16.0
offset_bottom = 16.0
grow_horizontal = 0
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label7" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2096,6 +2163,8 @@ offset_right = 16.0
offset_bottom = 16.0
grow_horizontal = 0
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label8" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2115,6 +2184,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_vk6gj")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label9" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2135,6 +2206,8 @@ offset_bottom = 16.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_i3nva")
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label10" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2153,6 +2226,8 @@ offset_right = 16.0
offset_bottom = 16.0
grow_horizontal = 0
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label11" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2171,6 +2246,8 @@ offset_right = 16.0
offset_bottom = 16.0
grow_horizontal = 0
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label12" type="Label" parent="Labels/BetaTesters2/Label"]
layout_mode = 0
@@ -2189,6 +2266,8 @@ offset_right = 16.0
offset_bottom = 16.0
grow_horizontal = 0
stretch_mode = 2
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="TextureRect" type="TextureRect" parent="Labels/BetaTesters2"]
layout_mode = 0
@@ -2197,6 +2276,8 @@ offset_top = 120.0
offset_right = 248.0
offset_bottom = 232.0
texture = ExtResource("13_17gvw")
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="SpecialThanks" type="Control" parent="Labels"]
visible = false
@@ -2217,6 +2298,8 @@ offset_top = 7.0
offset_right = 188.0
offset_bottom = 119.0
texture = ExtResource("13_irr87")
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label" type="Label" parent="Labels/SpecialThanks"]
layout_mode = 1
@@ -2382,6 +2465,8 @@ grow_horizontal = 2
grow_vertical = 0
texture = SubResource("AtlasTexture_7s4gc")
stretch_mode = 3
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="Label2" type="Label" parent="Labels/MadeWith"]
layout_mode = 1
@@ -2421,6 +2506,8 @@ grow_horizontal = 2
grow_vertical = 0
texture = SubResource("AtlasTexture_2xhay")
stretch_mode = 3
script = ExtResource("11_d4vu4")
metadata/_custom_type_script = "uid://ca3bew33g45eq"
[node name="MadeWith2" type="Control" parent="Labels"]
visible = false

View File

@@ -165,6 +165,7 @@ grow_vertical = 2
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/LevelSelect" to="." method="set_focus" binds= [false]]
[connection signal="focus_entered" from="PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/ReturnMenu" to="." method="set_index" binds= [3]]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/ReturnMenu" to="." method="go_to_menu"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/VBoxContainer/ReturnMenu" to="." method="close"]
[connection signal="cancelled" from="WorldSelect" to="." method="open"]
[connection signal="cancelled" from="WorldSelect" to="." method="set_focus" binds= [true]]
[connection signal="world_selected" from="WorldSelect" to="LevelSelect" method="open"]

View File

@@ -26,6 +26,7 @@ func _process(_delta: float) -> void:
if can_exit and Input.is_action_just_pressed("jump_0"):
SaveManager.write_save()
if Global.current_campaign == "SMBANN":
can_exit = false
Global.open_disco_results()
elif seen or Global.world_num > 8 or Global.current_game_mode != Global.GameMode.CAMPAIGN:
Global.transition_to_scene("res://Scenes/Levels/TitleScreen.tscn")