ability to leave level select for main menu

This commit is contained in:
Haze Weathers 2024-02-27 19:22:25 -05:00
parent 470857ecfa
commit ddafe49d12
2 changed files with 183 additions and 6 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=25 format=2]
[gd_scene load_steps=27 format=2]
[ext_resource path="res://menus/level_select_scholar.gd" type="Script" id=1]
[ext_resource path="res://graphics/level_select/world_map.png" type="Texture" id=2]
@ -77,6 +77,72 @@ tracks/1/keys = {
"update": 0,
"values": [ Vector2( 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("ExitPopup:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("ExitPopup:rect_scale")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Vector2( 1e-05, 0.011 ) ]
}
[sub_resource type="Animation" id=11]
resource_name = "hide_exit"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("ExitPopup:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("ExitPopup:rect_scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.2, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.07 ), Vector2( 0, 0.07 ) ]
}
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "grab_focus"
} ]
}
[sub_resource type="Animation" id=8]
resource_name = "hide_stats"
@ -91,7 +157,7 @@ tracks/0/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
"values": [ false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("LevelStats:rect_scale")
@ -106,6 +172,48 @@ tracks/1/keys = {
"values": [ Vector2( 1, 1 ), Vector2( 1, 0.02 ), Vector2( 0, 0.02 ) ]
}
[sub_resource type="Animation" id=12]
resource_name = "show_exit"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("ExitPopup:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("ExitPopup:rect_scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.2, 0.4 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0.07 ), Vector2( 1, 0.07 ), Vector2( 1, 1 ) ]
}
tracks/2/type = "method"
tracks/2/path = NodePath("ExitPopup/PanelContainer/VBoxContainer/HBoxContainer/StayHere")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "grab_focus"
} ]
}
[sub_resource type="Animation" id=7]
resource_name = "show_stats"
length = 0.4
@ -134,7 +242,10 @@ tracks/1/keys = {
"values": [ Vector2( 0, 0.02 ), Vector2( 1, 0.02 ), Vector2( 1, 1 ) ]
}
[node name="LevelSelect" type="Node"]
[node name="LevelSelect" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
focus_mode = 2
script = ExtResource( 1 )
[node name="WorldMap" type="TextureRect" parent="."]
@ -229,7 +340,7 @@ offset = 217.0
[node name="rust" type="PathFollow2D" parent="LevelPath"]
position = Vector2( 177.983, 131.216 )
rotation = 2.36487
rotation = 2.36506
offset = 258.0
[node name="lab" type="PathFollow2D" parent="LevelPath"]
@ -507,7 +618,9 @@ offset = Vector2( 5, 0 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/RESET = SubResource( 6 )
anims/hide_exit = SubResource( 11 )
anims/hide_stats = SubResource( 8 )
anims/show_exit = SubResource( 12 )
anims/show_stats = SubResource( 7 )
[node name="ShardCount" type="Label" parent="."]
@ -525,3 +638,54 @@ text = "72"
[node name="Shard" parent="." instance=ExtResource( 11 )]
position = Vector2( 4, 5 )
[node name="ExitPopup" type="CenterContainer" parent="."]
unique_name_in_owner = true
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
rect_scale = Vector2( 1e-05, 0.011 )
rect_pivot_offset = Vector2( 128, 96 )
theme = ExtResource( 4 )
[node name="PanelContainer" type="PanelContainer" parent="ExitPopup"]
margin_left = 125.0
margin_top = 93.0
margin_right = 131.0
margin_bottom = 99.0
[node name="VBoxContainer" type="VBoxContainer" parent="ExitPopup/PanelContainer"]
margin_left = 3.0
margin_top = 3.0
margin_right = 116.0
margin_bottom = 27.0
[node name="Label" type="Label" parent="ExitPopup/PanelContainer/VBoxContainer"]
margin_right = 113.0
margin_bottom = 10.0
text = "Return to menu?"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="ExitPopup/PanelContainer/VBoxContainer"]
margin_top = 14.0
margin_right = 113.0
margin_bottom = 24.0
custom_constants/separation = 8
alignment = 1
[node name="StayHere" type="Button" parent="ExitPopup/PanelContainer/VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
margin_right = 49.0
margin_bottom = 10.0
size_flags_horizontal = 3
text = "No way!"
[node name="ExitMenu" type="Button" parent="ExitPopup/PanelContainer/VBoxContainer/HBoxContainer"]
margin_left = 57.0
margin_right = 113.0
margin_bottom = 10.0
size_flags_horizontal = 3
text = "yeppers!"
[connection signal="pressed" from="ExitPopup/PanelContainer/VBoxContainer/HBoxContainer/StayHere" to="." method="_on_StayHere_pressed"]
[connection signal="pressed" from="ExitPopup/PanelContainer/VBoxContainer/HBoxContainer/ExitMenu" to="." method="_on_ExitMenu_pressed"]