From 75cd885a5828020374871b5b2e6cadbb11915c29 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Sat, 30 Dec 2023 23:15:18 -0500 Subject: [PATCH] PAusej whohowhohoho --- objects/hud/pause_screen.gd | 16 +++----- objects/hud/pause_screen.tscn | 72 ++++++++++++++--------------------- 2 files changed, 34 insertions(+), 54 deletions(-) diff --git a/objects/hud/pause_screen.gd b/objects/hud/pause_screen.gd index a495e0e..6208118 100644 --- a/objects/hud/pause_screen.gd +++ b/objects/hud/pause_screen.gd @@ -49,11 +49,10 @@ func _on_Resume_pressed(): func _on_Restart_pressed(): - Audio.ac_music.set_stream_paused(false) - Audio.ac_pause_music.stop() - Game.call_deferred("restart_level") - get_tree().paused = false - queue_free() + Fade.fade_out(0.4) + yield(Fade, "fade_finished") + unpause() + SceneManager.current_scene = load("res://menus/marathon_start.tscn").instance() func _on_Settings_pressed(): @@ -63,12 +62,9 @@ func _on_Settings_pressed(): func _on_ExitLevel_pressed(): - Audio.ac_music.set_stream_paused(false) - Audio.ac_pause_music.stop() - get_tree().paused = false - Game.change_map(load("res://menus/level_select_scholar.tscn")) + Fade.fade_out(0.4) yield(Fade, "fade_finished") - queue_free() + get_tree().quit() func _on_OptionsScreen_exit(): diff --git a/objects/hud/pause_screen.tscn b/objects/hud/pause_screen.tscn index 9480796..ad49c26 100644 --- a/objects/hud/pause_screen.tscn +++ b/objects/hud/pause_screen.tscn @@ -14,48 +14,50 @@ pause_mode = 2 layer = 110 script = ExtResource( 4 ) - -[node name="Border" type="NinePatchRect" parent="."] -margin_left = 64.0 -margin_top = 25.0 -margin_right = 192.0 -margin_bottom = 82.0 -texture = ExtResource( 8 ) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +__meta__ = { +"_edit_horizontal_guides_": [ 84.0 ] +} [node name="ColorRect" type="ColorRect" parent="."] pause_mode = 2 margin_left = 67.0 -margin_top = 28.0 +margin_top = 34.0 margin_right = 189.0 -margin_bottom = 79.0 +margin_bottom = 72.0 color = Color( 0.239216, 0.239216, 0.443137, 1 ) [node name="Paused" type="Label" parent="."] pause_mode = 2 material = ExtResource( 6 ) margin_left = 64.0 -margin_top = 14.0 +margin_top = 20.0 margin_right = 192.0 -margin_bottom = 24.0 +margin_bottom = 30.0 theme = ExtResource( 5 ) text = "PAUSED!" align = 1 +[node name="Border" type="NinePatchRect" parent="."] +margin_left = 64.0 +margin_top = 31.0 +margin_right = 192.0 +margin_bottom = 75.0 +texture = ExtResource( 8 ) +patch_margin_left = 3 +patch_margin_top = 3 +patch_margin_right = 3 +patch_margin_bottom = 3 + [node name="Body" type="Label" parent="."] pause_mode = 2 margin_left = 64.0 -margin_top = 29.0 +margin_top = 35.0 margin_right = 192.0 -margin_bottom = 78.0 +margin_bottom = 75.0 theme = ExtResource( 2 ) text = "RESUME -RESTART -OPTIONS -EXit level" +RESTART GAME +EXIT GAME" align = 1 [node name="Resume" type="TextureButton" parent="Body"] @@ -73,38 +75,23 @@ texture_focused = ExtResource( 3 ) [node name="Restart" type="TextureButton" parent="Body"] pause_mode = 2 material = ExtResource( 1 ) -margin_left = 32.0 +margin_left = 15.0 margin_top = 14.0 -margin_right = 40.0 +margin_right = 23.0 margin_bottom = 22.0 focus_neighbour_left = NodePath(".") focus_neighbour_top = NodePath("../Resume") focus_neighbour_right = NodePath(".") -focus_neighbour_bottom = NodePath("../Settings") -texture_focused = ExtResource( 3 ) - -[node name="Settings" type="TextureButton" parent="Body"] -pause_mode = 2 -material = ExtResource( 1 ) -margin_left = 32.0 -margin_top = 27.0 -margin_right = 40.0 -margin_bottom = 35.0 -focus_neighbour_left = NodePath(".") -focus_neighbour_top = NodePath("../Restart") -focus_neighbour_right = NodePath(".") -focus_neighbour_bottom = NodePath("../ExitLevel") texture_focused = ExtResource( 3 ) [node name="ExitLevel" type="TextureButton" parent="Body"] pause_mode = 2 material = ExtResource( 1 ) -margin_left = 22.0 -margin_top = 40.0 -margin_right = 30.0 -margin_bottom = 48.0 +margin_left = 25.0 +margin_top = 27.0 +margin_right = 33.0 +margin_bottom = 35.0 focus_neighbour_left = NodePath(".") -focus_neighbour_top = NodePath("../Settings") focus_neighbour_right = NodePath(".") texture_focused = ExtResource( 3 ) @@ -127,9 +114,6 @@ visible = false [connection signal="focus_entered" from="Body/Restart" to="MenuSounds" method="play_select_sound"] [connection signal="pressed" from="Body/Restart" to="." method="_on_Restart_pressed"] [connection signal="pressed" from="Body/Restart" to="MenuSounds" method="play_confirm_sound"] -[connection signal="focus_entered" from="Body/Settings" to="MenuSounds" method="play_select_sound"] -[connection signal="pressed" from="Body/Settings" to="." method="_on_Settings_pressed"] -[connection signal="pressed" from="Body/Settings" to="MenuSounds" method="play_confirm_sound"] [connection signal="focus_entered" from="Body/ExitLevel" to="MenuSounds" method="play_select_sound"] [connection signal="pressed" from="Body/ExitLevel" to="." method="_on_ExitLevel_pressed"] [connection signal="pressed" from="Body/ExitLevel" to="MenuSounds" method="play_confirm_sound"]