From 25fe48f8a1c1d0baba58c08c4486ce377ef5f52d Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 12 Oct 2023 18:21:22 +0200 Subject: [PATCH] Make `Main` a `Control` --- main.gd | 2 +- main.tscn | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/main.gd b/main.gd index 1cac99d..7b45784 100644 --- a/main.gd +++ b/main.gd @@ -1,4 +1,4 @@ -extends Node +extends Control class_name Main diff --git a/main.tscn b/main.tscn index 4efc5de..978070e 100644 --- a/main.tscn +++ b/main.tscn @@ -14,12 +14,18 @@ script/source = "extends SubViewport " -[node name="Main" type="Node"] +[node name="Main" 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_fqt34") [node name="CustomUI" type="Control" parent="."] texture_filter = 1 -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -98,20 +104,20 @@ secret = "fTpQAFA3mXx7VWfn" [connection signal="shop_button_pressed" from="CustomUI/GameSafeUI/GameUI" to="." method="_on_game_ui_shop_button_pressed"] [connection signal="spawn_button_pressed" from="CustomUI/GameSafeUI/GameUI" to="CustomUI/GameViewport/Viewport/Game" method="trigger_spawn"] [connection signal="back_button_pressed" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_back_button_pressed"] -[connection signal="delete_begin" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_delete_begin"] [connection signal="delete_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_shop_ui_delete_begin"] [connection signal="delete_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_delete_begin"] -[connection signal="delete_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_delete_cancel"] +[connection signal="delete_begin" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_delete_begin"] [connection signal="delete_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_shop_ui_delete_cancel"] [connection signal="delete_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_delete_cancel"] +[connection signal="delete_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_delete_cancel"] [connection signal="ghost_materialize" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_ghost_materialize"] [connection signal="ghost_requested" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_ghost_requested"] -[connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_begin"] [connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_begin"] [connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_purchase_begin"] -[connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_cancel"] +[connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_begin"] [connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_cancel"] [connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_purchase_cancel"] +[connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_cancel"] [connection signal="purchase_success" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_success"] [connection signal="purchase_success" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_purchase_success"] [connection signal="score_button_pressed" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_score_button_pressed"]