[gd_scene load_steps=3 format=3 uid="uid://b4fv851s0h11f"]

[ext_resource type="PackedScene" uid="uid://dekuqrdjmnr1m" path="res://Scenes/Prefabs/UI/BasePauseMenu.tscn" id="1_rf1ii"]

[sub_resource type="GDScript" id="GDScript_3lwy2"]
script/source = "extends Node

func restart_race() -> void:
	AudioManager.stop_all_music()
	Global.reset_values()
	Global.clear_saved_values()
	Global.transition_to_scene(Global.current_level.scene_file_path)

func quit_to_menu() -> void:
	AudioManager.stop_all_music()
	Global.transition_to_scene(\"res://Scenes/Levels/BooRaceMenu.tscn\")
	get_tree().paused = true
	await Global.current_level.tree_exited
	get_tree().paused = false
"

[node name="PauseMenu" instance=ExtResource("1_rf1ii")]

[node name="Label2" parent="Control/PanelContainer/MarginContainer/VBoxContainer" index="1"]
text = "PAUSE_RACE_RESTART"

[node name="Cursor" parent="Control" index="1"]
offset_left = 0.0
offset_top = 0.0
offset_right = 8.0
offset_bottom = 8.0

[node name="Handler" type="Node" parent="." index="2"]
script = SubResource("GDScript_3lwy2")

[connection signal="option_1_selected" from="." to="." method="close"]
[connection signal="option_2_selected" from="." to="." method="close"]
[connection signal="option_2_selected" from="." to="Handler" method="restart_race"]
[connection signal="option_4_selected" from="." to="." method="close"]
[connection signal="option_4_selected" from="." to="Handler" method="quit_to_menu"]

[editable path="SettingsMenu"]
[editable path="SettingsMenu/PanelContainer/MarginContainer/VBoxContainer/Video/Language"]
[editable path="SettingsMenu/PanelContainer/MarginContainer/VBoxContainer/Audio/SelectableOptionNode"]
[editable path="SettingsMenu/PanelContainer/MarginContainer/VBoxContainer/Audio/SelectableOptionNode2"]
[editable path="SettingsMenu/PanelContainer/MarginContainer/VBoxContainer/Audio/SelectableOptionNode3"]
