From 0cf127acecad80aebdb52b0c50196c322c3bd411 Mon Sep 17 00:00:00 2001 From: Techwizz Date: Sat, 11 Mar 2023 16:03:03 -0700 Subject: [PATCH] Added scene changer back --- export_presets.cfg | 4 ++-- scenes/credits.tscn | 1 + scenes/mainmenu.tscn | 1 - scripts/mainmenu.gd | 6 ++++-- scripts/sceneChangerConfirm.gd | 1 - 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/export_presets.cfg b/export_presets.cfg index 0e27be4..1e20c78 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -110,7 +110,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="export/teddy.x86_64" +export_path="export/linux/teddy.x86_64" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -151,7 +151,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="export/Project Teddy.exe" +export_path="export/windows/Project Teddy.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false diff --git a/scenes/credits.tscn b/scenes/credits.tscn index e49b09c..313f631 100644 --- a/scenes/credits.tscn +++ b/scenes/credits.tscn @@ -85,6 +85,7 @@ offset_bottom = 454.0 text = "Blender" [node name="Label9" type="Label" parent="."] +layout_mode = 0 offset_left = 554.0 offset_top = 457.0 offset_right = 617.0 diff --git a/scenes/mainmenu.tscn b/scenes/mainmenu.tscn index af754eb..1fab586 100644 --- a/scenes/mainmenu.tscn +++ b/scenes/mainmenu.tscn @@ -133,7 +133,6 @@ texture = ExtResource("10_oafyi") [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource("11_6irkm") -autoplay = true [connection signal="pressed" from="Button" to="." method="_on_button_pressed"] [connection signal="mouse_entered" from="playButton" to="." method="_on_play_button_mouse_entered"] diff --git a/scripts/mainmenu.gd b/scripts/mainmenu.gd index 6d7176c..5a94c77 100644 --- a/scripts/mainmenu.gd +++ b/scripts/mainmenu.gd @@ -34,8 +34,10 @@ func _on_button_2_pressed(): func _on_button_3_pressed(): if Global.playingGame == true: - get_tree().change_scene_to_file("res://scenes/mainmenu-background.tscn") - Global.playingGame = false + Global.goScene = "res://scenes/mainmenu-background.tscn" + var scene_trs =load("res://scenes/sceneChangerConfirm.tscn") + var scene=scene_trs.instantiate() + add_child(scene) elif Global.playingGame == false: get_tree().quit() diff --git a/scripts/sceneChangerConfirm.gd b/scripts/sceneChangerConfirm.gd index 5b8ccc8..5772d0b 100644 --- a/scripts/sceneChangerConfirm.gd +++ b/scripts/sceneChangerConfirm.gd @@ -11,7 +11,6 @@ func _process(delta): func _on_yes_button_pressed(): Global.playingGame = false - Global.menuOpen = false get_tree().change_scene_to_file(Global.goScene)