diff options
author | Logan <logan@cflip.net> | 2023-01-30 16:49:29 -0700 |
---|---|---|
committer | Logan <logan@cflip.net> | 2023-01-30 16:49:29 -0700 |
commit | 393260b3573e08f0914017ca702843f677bd1546 (patch) | |
tree | 1fc8418f5215776af81d539e860dd5dfec14acdb /scenes | |
parent | 9ebeb1c836deb561f53b49f004d95a685dec6880 (diff) |
Added pausemenu and various changes to interface.
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/interface.tscn | 153 | ||||
-rw-r--r-- | scenes/pausemenu.tscn | 67 |
2 files changed, 210 insertions, 10 deletions
diff --git a/scenes/interface.tscn b/scenes/interface.tscn index e36bd9b..169d551 100644 --- a/scenes/interface.tscn +++ b/scenes/interface.tscn @@ -1,8 +1,112 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=7 format=2] -[ext_resource path="res://theme_data/interface_theme.tres" type="Theme" id=1] +[ext_resource path="res://scenes/pausemenu.tscn" type="PackedScene" id=1] [ext_resource path="res://textures/hourglass.png" type="Texture" id=2] [ext_resource path="res://scripts/interface.gd" type="Script" id=3] +[ext_resource path="res://theme_data/interface_theme.tres" type="Theme" id=4] + +[sub_resource type="Animation" id=1] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath(".: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": 0, +"values": [ false ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("../ChangeLabel:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ false ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("../ChangeLabel:modulate") +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": [ Color( 1, 1, 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +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": [ Color( 1, 1, 1, 1 ) ] +} + +[sub_resource type="Animation" id=2] +resource_name = "blinking" +length = 4.0 +tracks/0/type = "value" +tracks/0/path = NodePath(".:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 3 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ true, false ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("../ChangeLabel:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 3 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ true, false ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("../ChangeLabel:modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.5, 1, 1.5, 2, 2.5, 3 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 0.5, 2.5, 3 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} [node name="Interface" type="CanvasLayer"] script = ExtResource( 3 ) @@ -18,7 +122,7 @@ margin_top = 104.0 margin_right = 216.0 margin_bottom = 116.0 rect_scale = Vector2( 0.8, 0.8 ) -theme = ExtResource( 1 ) +theme = ExtResource( 4 ) text = "000" align = 2 @@ -27,20 +131,45 @@ margin_top = -2.0 margin_right = 48.0 margin_bottom = 14.0 rect_scale = Vector2( 0.8, 0.8 ) -theme = ExtResource( 1 ) +theme = ExtResource( 4 ) text = "Score:" [node name="Timer" type="Timer" parent="."] -[node name="Control" type="Control" parent="."] +[node name="LoseLabel" type="Label" parent="."] visible = false - -[node name="Label" type="Label" parent="Control"] margin_top = 40.0 margin_right = 214.0 margin_bottom = 80.0 -text = "YOU LOSE. YOU WIN NOTHING. -GOOD DAY SIR!" +theme = ExtResource( 4 ) +text = "YOU RAN OUT OF TIME! +RESTART?" +align = 1 + +[node name="Difficulty" type="Control" parent="."] +margin_top = 40.0 +margin_right = 40.0 +margin_bottom = 80.0 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Difficulty"] +root_node = NodePath("../MessageLabel") +anims/RESET = SubResource( 1 ) +anims/blinking = SubResource( 2 ) + +[node name="MessageLabel" type="Label" parent="Difficulty"] +visible = false +margin_right = 214.0 +theme = ExtResource( 4 ) +text = "DIFFICULT PHASE CHANGED:" +align = 1 + +[node name="ChangeLabel" type="Label" parent="Difficulty"] +visible = false +margin_top = 14.0 +margin_right = 214.0 +margin_bottom = 30.0 +custom_colors/font_color_shadow = Color( 0.788235, 0.0823529, 0.0823529, 1 ) +text = "TEST" align = 1 [node name="PhaseLabel" type="Label" parent="."] @@ -48,7 +177,11 @@ margin_top = 112.0 margin_right = 88.0 margin_bottom = 128.0 rect_scale = Vector2( 0.5, 0.5 ) -theme = ExtResource( 1 ) +theme = ExtResource( 4 ) text = "Next Phase: " +[node name="PauseMenu" parent="." instance=ExtResource( 1 )] +pause_mode = 2 +visible = false + [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/scenes/pausemenu.tscn b/scenes/pausemenu.tscn new file mode 100644 index 0000000..ab9fc87 --- /dev/null +++ b/scenes/pausemenu.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scripts/pausemenu.gd" type="Script" id=1] + +[node name="Menu" type="Control"] +margin_right = 214.0 +margin_bottom = 120.0 +script = ExtResource( 1 ) + +[node name="ColorRect" type="ColorRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0, 0, 0, 0.54902 ) + +[node name="Label" type="Label" parent="."] +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -24.0 +margin_right = 24.0 +margin_bottom = 16.0 +custom_colors/font_color_shadow = Color( 0.270588, 0.294118, 0.443137, 1 ) +text = "PAUSED" + +[node name="Control" type="Control" parent="."] +margin_right = 428.0 +margin_bottom = 240.0 +rect_scale = Vector2( 0.5, 0.5 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="Control"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -50.0 +margin_top = -76.0 +margin_right = 50.0 +margin_bottom = 76.0 + +[node name="RestartButton" type="Button" parent="Control/VBoxContainer"] +margin_right = 100.0 +margin_bottom = 22.0 +text = "Restart" + +[node name="HelpButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 26.0 +margin_right = 100.0 +margin_bottom = 48.0 +disabled = true +text = "Help" + +[node name="OptionsButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 52.0 +margin_right = 100.0 +margin_bottom = 74.0 +disabled = true +text = "Options" + +[node name="QuitButton" type="Button" parent="Control/VBoxContainer"] +margin_top = 78.0 +margin_right = 100.0 +margin_bottom = 100.0 +text = "Quit" + +[connection signal="pressed" from="Control/VBoxContainer/RestartButton" to="." method="_on_RestartButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/HelpButton" to="." method="_on_HelpButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/OptionsButton" to="." method="_on_OptionsButton_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"] |