aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-22 23:48:25 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:29:14 +0200
commit2c5ced9a026012ef8fe890ff006d261148ce70f1 (patch)
tree40c0d9073a3302ce9fe18f800325af697ae2582e
parentfd01e27d3bed73fd216cbe9bce24de34e6859a7f (diff)
downloadhurrycurry-2c5ced9a026012ef8fe890ff006d261148ce70f1.tar
hurrycurry-2c5ced9a026012ef8fe890ff006d261148ce70f1.tar.bz2
hurrycurry-2c5ced9a026012ef8fe890ff006d261148ce70f1.tar.zst
fix scene transition flicker
-rw-r--r--client/scenes/credits_menu.tscn83
-rw-r--r--client/scenes/main_menu.tscn90
-rw-r--r--client/scenes/scene_transition.tscn71
3 files changed, 244 insertions, 0 deletions
diff --git a/client/scenes/credits_menu.tscn b/client/scenes/credits_menu.tscn
new file mode 100644
index 00000000..65035329
--- /dev/null
+++ b/client/scenes/credits_menu.tscn
@@ -0,0 +1,83 @@
+[gd_scene load_steps=6 format=3 uid="uid://7mqbxa054bjv"]
+
+[ext_resource type="PackedScene" uid="uid://bgt88u55bndd3" path="res://scenes/menu_background.tscn" id="1_5ay7o"]
+[ext_resource type="Script" path="res://scripts/credits_menu.gd" id="1_igs63"]
+[ext_resource type="PackedScene" uid="uid://ds1njrptrpdco" path="res://scenes/menu_background_scene.tscn" id="2_k0853"]
+[ext_resource type="PackedScene" uid="uid://bg2d78ycorcqk" path="res://scenes/scene_transition.tscn" id="4_fbbdb"]
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p2qmw"]
+bg_color = Color(0, 0, 0, 0.576471)
+
+[node name="CreditsMenu" type="Control"]
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+script = ExtResource("1_igs63")
+
+[node name="MenuBackground" parent="." instance=ExtResource("1_5ay7o")]
+layout_mode = 1
+script = null
+
+[node name="background_view2" type="SubViewport" parent="MenuBackground"]
+handle_input_locally = false
+size = Vector2i(1152, 648)
+render_target_update_mode = 4
+
+[node name="scene" parent="MenuBackground/background_view2" instance=ExtResource("2_k0853")]
+
+[node name="Panel" type="Panel" parent="."]
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+theme_override_styles/panel = SubResource("StyleBoxFlat_p2qmw")
+
+[node name="RichTextLabel" type="RichTextLabel" parent="Panel"]
+layout_mode = 1
+anchors_preset = 8
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+offset_left = -222.0
+offset_top = -112.0
+offset_right = 222.0
+offset_bottom = 125.0
+grow_horizontal = 2
+grow_vertical = 2
+bbcode_enabled = true
+text = "[center][b]undercooked - a game about cooking[/b]
+
+by
+
+[b]tpart, nokoe, metamuffin[/b]
+
+using assets from kenney.nl
+
+[/center]"
+
+[node name="back" type="Button" parent="Panel"]
+layout_mode = 1
+anchors_preset = 7
+anchor_left = 0.5
+anchor_top = 1.0
+anchor_right = 0.5
+anchor_bottom = 1.0
+offset_left = -79.0
+offset_top = -65.0
+offset_right = 81.0
+offset_bottom = -34.0
+grow_horizontal = 2
+grow_vertical = 0
+text = "Back"
+
+[node name="SceneTransition" parent="." instance=ExtResource("4_fbbdb")]
+layout_mode = 1
+color = Color(0, 0, 0, 1)
+
+[connection signal="pressed" from="Panel/back" to="." method="_on_back_pressed"]
diff --git a/client/scenes/main_menu.tscn b/client/scenes/main_menu.tscn
new file mode 100644
index 00000000..e1c3475d
--- /dev/null
+++ b/client/scenes/main_menu.tscn
@@ -0,0 +1,90 @@
+[gd_scene load_steps=7 format=3 uid="uid://dbj8508whxgwv"]
+
+[ext_resource type="Theme" uid="uid://cnhhreuc4shxv" path="res://scenes/theme.tres" id="1_rmwly"]
+[ext_resource type="Script" path="res://scripts/main_menu.gd" id="2_qot2j"]
+[ext_resource type="PackedScene" uid="uid://bgt88u55bndd3" path="res://scenes/menu_background.tscn" id="3_f3j3x"]
+[ext_resource type="PackedScene" uid="uid://ds1njrptrpdco" path="res://scenes/menu_background_scene.tscn" id="4_ydj5p"]
+[ext_resource type="PackedScene" uid="uid://bg2d78ycorcqk" path="res://scenes/scene_transition.tscn" id="5_651nk"]
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d8o0f"]
+bg_color = Color(0, 0, 0, 0.329412)
+
+[node name="MainMenu" type="Control"]
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+theme = ExtResource("1_rmwly")
+script = ExtResource("2_qot2j")
+
+[node name="MenuBackground" parent="." instance=ExtResource("3_f3j3x")]
+layout_mode = 1
+script = null
+
+[node name="background_view2" type="SubViewport" parent="MenuBackground"]
+handle_input_locally = false
+size = Vector2i(1152, 648)
+render_target_update_mode = 4
+
+[node name="scene" parent="MenuBackground/background_view2" instance=ExtResource("4_ydj5p")]
+
+[node name="side" type="PanelContainer" parent="."]
+layout_mode = 1
+anchors_preset = 9
+anchor_bottom = 1.0
+offset_right = 340.0
+grow_vertical = 2
+theme_override_styles/panel = SubResource("StyleBoxFlat_d8o0f")
+
+[node name="options" type="VBoxContainer" parent="side"]
+layout_mode = 2
+
+[node name="quick_connect" type="Button" parent="side/options"]
+layout_mode = 2
+text = "Quick Connect"
+alignment = 0
+
+[node name="connect" type="HBoxContainer" parent="side/options"]
+layout_mode = 2
+
+[node name="uri" type="LineEdit" parent="side/options/connect"]
+layout_mode = 2
+size_flags_horizontal = 3
+placeholder_text = "wss://example.org"
+
+[node name="connect" type="Button" parent="side/options/connect"]
+layout_mode = 2
+text = "Connect"
+
+[node name="change_character" type="Button" parent="side/options"]
+layout_mode = 2
+text = "Select Character (todo)"
+alignment = 0
+
+[node name="settings" type="Button" parent="side/options"]
+layout_mode = 2
+text = "Settings (todo)"
+alignment = 0
+
+[node name="credits" type="Button" parent="side/options"]
+layout_mode = 2
+text = "Credits"
+alignment = 0
+
+[node name="quit" type="Button" parent="side/options"]
+layout_mode = 2
+text = "Quit"
+alignment = 0
+
+[node name="SceneTransition" parent="." instance=ExtResource("5_651nk")]
+layout_mode = 1
+color = Color(0, 0, 0, 1)
+
+[connection signal="pressed" from="side/options/quick_connect" to="." method="_on_quick_connect_pressed"]
+[connection signal="pressed" from="side/options/connect/connect" to="." method="_on_connect_pressed"]
+[connection signal="pressed" from="side/options/change_character" to="." method="_on_credits_pressed"]
+[connection signal="pressed" from="side/options/settings" to="." method="_on_credits_pressed"]
+[connection signal="pressed" from="side/options/credits" to="." method="_on_credits_pressed"]
+[connection signal="pressed" from="side/options/quit" to="." method="_on_quit_pressed"]
diff --git a/client/scenes/scene_transition.tscn b/client/scenes/scene_transition.tscn
new file mode 100644
index 00000000..0865dddf
--- /dev/null
+++ b/client/scenes/scene_transition.tscn
@@ -0,0 +1,71 @@
+[gd_scene load_steps=6 format=3 uid="uid://bg2d78ycorcqk"]
+
+[ext_resource type="Script" path="res://scripts/scene_transition.gd" id="1_c2vxm"]
+
+[sub_resource type="Animation" id="Animation_xgn2a"]
+length = 0.001
+tracks/0/type = "value"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".:color")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = {
+"times": PackedFloat32Array(0),
+"transitions": PackedFloat32Array(1),
+"update": 0,
+"values": [Color(0, 0, 0, 1)]
+}
+
+[sub_resource type="Animation" id="Animation_tglmc"]
+resource_name = "fade_in"
+tracks/0/type = "value"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".:color")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = {
+"times": PackedFloat32Array(0, 0.9),
+"transitions": PackedFloat32Array(1, 1),
+"update": 0,
+"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
+}
+
+[sub_resource type="Animation" id="Animation_egop8"]
+resource_name = "fade_out"
+tracks/0/type = "value"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".:color")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = {
+"times": PackedFloat32Array(0, 0.9),
+"transitions": PackedFloat32Array(1, 1),
+"update": 0,
+"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
+}
+
+[sub_resource type="AnimationLibrary" id="AnimationLibrary_pea72"]
+_data = {
+"RESET": SubResource("Animation_xgn2a"),
+"fade_in": SubResource("Animation_tglmc"),
+"fade_out": SubResource("Animation_egop8")
+}
+
+[node name="SceneTransition" type="ColorRect"]
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+mouse_filter = 2
+color = Color(0, 0, 0, 1)
+script = ExtResource("1_c2vxm")
+
+[node name="animation" type="AnimationPlayer" parent="."]
+libraries = {
+"": SubResource("AnimationLibrary_pea72")
+}
+speed_scale = 4.0