fuzzyworld

godot-shooter / commit

Synchronized the pause and game over menus.

98f848796bd870e50d8f8e37d26df00331b85615 · Pavel Safronov · 2023-11-09 16:42:44 -0800 · parents 5f3f5126c3b9

Synchronized the pause and game over menus.
 World.tscn | 56 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/World.tscn b/World.tscn
index 80017b5..4e62bff 100644
--- a/World.tscn
+++ b/World.tscn
@@ -59,33 +59,35 @@ pause_mode = 2
 visible = false
 anchor_right = 1.0
 anchor_bottom = 1.0
-margin_right = 40.0
-margin_bottom = 40.0
 mouse_filter = 2
 
-[node name="Panel" type="Panel" parent="UI/PauseMenu"]
-margin_left = 120.0
-margin_top = 233.0
-margin_right = 370.0
-margin_bottom = 483.0
-
-[node name="VBoxContainer" type="VBoxContainer" parent="UI/PauseMenu/Panel"]
-margin_left = 68.0
-margin_top = 72.0
-margin_right = 132.0
-margin_bottom = 110.0
-
-[node name="Label" type="Label" parent="UI/PauseMenu/Panel/VBoxContainer"]
-margin_right = 126.0
-margin_bottom = 35.0
-theme = ExtResource( 6 )
+[node name="CenterContainer" type="CenterContainer" parent="UI/PauseMenu"]
+anchor_right = 1.0
+anchor_bottom = 1.0
+
+[node name="PanelContainer" type="PanelContainer" parent="UI/PauseMenu/CenterContainer"]
+margin_left = 236.0
+margin_top = 386.0
+margin_right = 264.0
+margin_bottom = 414.0
+
+[node name="VBoxContainer" type="VBoxContainer" parent="UI/PauseMenu/CenterContainer/PanelContainer"]
+margin_left = 14.0
+margin_top = 14.0
+margin_right = 162.0
+margin_bottom = 125.0
+
+[node name="Label" type="Label" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer"]
+margin_right = 148.0
+margin_bottom = 56.0
+theme = ExtResource( 7 )
 text = "Paused"
 align = 1
 
-[node name="Button" type="Button" parent="UI/PauseMenu/Panel/VBoxContainer"]
-margin_top = 43.0
-margin_right = 126.0
-margin_bottom = 90.0
+[node name="Button" type="Button" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer"]
+margin_top = 64.0
+margin_right = 148.0
+margin_bottom = 111.0
 theme = ExtResource( 6 )
 text = "Resume"
 
@@ -108,10 +110,10 @@ margin_right = 264.0
 margin_bottom = 414.0
 
 [node name="VBoxContainer" type="VBoxContainer" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer"]
-margin_left = 166.0
-margin_top = 303.0
-margin_right = 334.0
-margin_bottom = 497.0
+margin_left = 14.0
+margin_top = 14.0
+margin_right = 182.0
+margin_bottom = 208.0
 
 [node name="Label" type="Label" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer/VBoxContainer"]
 margin_right = 168.0
@@ -148,5 +150,5 @@ antialiased = true
 [connection signal="body_entered" from="Destination" to="." method="_on_Destination_body_entered"]
 [connection signal="debug_signal" from="UI/HUD" to="." method="_on_HUD_debug_signal"]
 [connection signal="paused" from="UI/HUD" to="." method="_on_HUD_paused"]
-[connection signal="pressed" from="UI/PauseMenu/Panel/VBoxContainer/Button" to="." method="_on_Button_pressed"]
+[connection signal="pressed" from="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"]
 [connection signal="timeout" from="ShootTimer" to="." method="_on_ShootTimer_timeout"]