fuzzyworld

godot-shooter / commit

Improved pause menu.

776d64997912d5c602f7cab67e52289147cdec6a · Pavel Safronov · 2023-11-05 17:09:08 -0800 · parents 9c1a88cd27b5

Improved pause menu.
 World.tscn | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/World.tscn b/World.tscn
index 09d484a..9da4a8d 100644
--- a/World.tscn
+++ b/World.tscn
@@ -1,10 +1,11 @@
-[gd_scene load_steps=7 format=2]
+[gd_scene load_steps=8 format=2]
 
 [ext_resource path="res://assets/kenney_simple-space/PNG/Default/icon_crossLarge.png" type="Texture" id=1]
 [ext_resource path="res://Player.tscn" type="PackedScene" id=2]
 [ext_resource path="res://HUD.tscn" type="PackedScene" id=3]
 [ext_resource path="res://World.gd" type="Script" id=4]
 [ext_resource path="res://StarField.tscn" type="PackedScene" id=5]
+[ext_resource path="res://CharacterTheme.tres" type="Theme" id=6]
 
 [sub_resource type="CircleShape2D" id=1]
 radius = 29.0172
@@ -71,31 +72,36 @@ margin_bottom = 40.0
 mouse_filter = 2
 
 [node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/PauseMenu"]
+visible = false
 anchor_right = 1.0
 anchor_bottom = 1.0
 margin_right = 40.0
 margin_bottom = 40.0
 
-[node name="Panel" type="Panel" parent="CanvasLayer/PauseMenu/CenterContainer"]
-margin_left = 552.0
-margin_top = 340.0
-margin_right = 552.0
-margin_bottom = 340.0
-
-[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/PauseMenu/CenterContainer/Panel"]
-margin_left = 50.0
-margin_top = 50.0
-
-[node name="Label" type="Label" parent="CanvasLayer/PauseMenu/CenterContainer/Panel/VBoxContainer"]
-margin_right = 64.0
-margin_bottom = 14.0
+[node name="Panel" type="Panel" parent="CanvasLayer/PauseMenu"]
+margin_left = 407.0
+margin_top = 218.0
+margin_right = 657.0
+margin_bottom = 468.0
+
+[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/PauseMenu/Panel"]
+margin_left = 68.0
+margin_top = 72.0
+margin_right = 132.0
+margin_bottom = 110.0
+
+[node name="Label" type="Label" parent="CanvasLayer/PauseMenu/Panel/VBoxContainer"]
+margin_right = 114.0
+margin_bottom = 35.0
+theme = ExtResource( 6 )
 text = "Paused"
 align = 1
 
-[node name="Button" type="Button" parent="CanvasLayer/PauseMenu/CenterContainer/Panel/VBoxContainer"]
-margin_top = 18.0
-margin_right = 64.0
-margin_bottom = 38.0
+[node name="Button" type="Button" parent="CanvasLayer/PauseMenu/Panel/VBoxContainer"]
+margin_top = 39.0
+margin_right = 114.0
+margin_bottom = 80.0
+theme = ExtResource( 6 )
 text = "Resume"
 
 [node name="ShootTimer" type="Timer" parent="."]
@@ -116,5 +122,5 @@ round_precision = 13
 antialiased = true
 
 [connection signal="body_entered" from="Destination" to="." method="_on_Destination_body_entered"]
-[connection signal="pressed" from="CanvasLayer/PauseMenu/CenterContainer/Panel/VBoxContainer/Button" to="." method="_on_Button_pressed"]
+[connection signal="pressed" from="CanvasLayer/PauseMenu/Panel/VBoxContainer/Button" to="." method="_on_Button_pressed"]
 [connection signal="timeout" from="ShootTimer" to="." method="_on_ShootTimer_timeout"]