Pause Menu and navigation
This commit is contained in:
@ -1,9 +1,56 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://ddn64i6logtw0"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://ddn64i6logtw0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c6sh5em844tx2" path="res://Game/sidepanel.gd" id="1_klyhg"]
|
||||
[ext_resource type="FontFile" uid="uid://bu44ne346ymoe" path="res://Assets/Others/Canterbury.ttf" id="2_4l4p2"]
|
||||
|
||||
[node name="SidePanel" type="Panel"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s7jra"]
|
||||
bg_color = Color(0.6, 0.6, 0.6, 0.392157)
|
||||
border_color = Color(0, 0, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_qvqxt"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f5es8"]
|
||||
bg_color = Color(0.485703, 0.485704, 0.485703, 0.447059)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dgw1d"]
|
||||
bg_color = Color(0.117647, 0.117647, 0.117647, 0.682353)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nctfw"]
|
||||
bg_color = Color(1, 1, 1, 0.447059)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
shadow_size = 5
|
||||
|
||||
[node name="SidePanel" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_klyhg")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(0, 60)
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
@ -12,9 +59,8 @@ grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 8
|
||||
script = ExtResource("1_klyhg")
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="."]
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="Panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@ -24,21 +70,21 @@ grow_vertical = 2
|
||||
theme_override_constants/separation = 60
|
||||
alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer4/HBoxContainer"]
|
||||
[node name="Label" type="Label" parent="Panel/HBoxContainer4/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Coins: "
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Button2" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -46,7 +92,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Archer"
|
||||
|
||||
[node name="Button3" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -54,7 +100,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Wizard"
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer2"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -62,12 +108,12 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Mortar"
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Button2" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -75,7 +121,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Sticks"
|
||||
|
||||
[node name="Button3" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -83,7 +129,7 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Mine"
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer4"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -91,12 +137,12 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Wall"
|
||||
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Button4" type="Button" parent="HBoxContainer4/HBoxContainer5"]
|
||||
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer5"]
|
||||
custom_minimum_size = Vector2(90, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@ -104,11 +150,82 @@ size_flags_vertical = 4
|
||||
focus_mode = 0
|
||||
text = "Sell"
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="HBoxContainer4"]
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="Panel/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 120
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer4/HBoxContainer3"]
|
||||
[node name="Label" type="Label" parent="Panel/HBoxContainer4/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "Lives: "
|
||||
|
||||
[node name="pausemenu" type="PanelContainer" parent="."]
|
||||
custom_minimum_size = Vector2(250, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -306.0
|
||||
offset_top = -227.5
|
||||
offset_right = 306.0
|
||||
offset_bottom = 227.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_s7jra")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="pausemenu"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="pausemenu/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_fonts/font = ExtResource("2_4l4p2")
|
||||
theme_override_font_sizes/font_size = 64
|
||||
text = "Game Paused"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Button" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Main Menu"
|
||||
|
||||
[node name="Button2" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Restart"
|
||||
|
||||
[node name="Button3" type="Button" parent="pausemenu/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(250, 60)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
|
||||
text = "Continue"
|
||||
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button" to="." method="_on_button_pressed"]
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button2" to="." method="_on_button_2_pressed"]
|
||||
[connection signal="pressed" from="pausemenu/VBoxContainer/Button3" to="." method="_on_button_3_pressed"]
|
||||
|
Reference in New Issue
Block a user