From 29e3c60d1a06f2cdbcb7ebfd5e23048a1a8d3ae5 Mon Sep 17 00:00:00 2001 From: Jakob Feldmann Date: Mon, 7 Aug 2023 14:51:35 +0200 Subject: [PATCH] feat: Audio Menu --- assets/ui/sci-fi-godot-theme/sci-fi.png | Bin 4213 -> 4041 bytes assets/ui/simpleGradient.tres | 14 + project.godot | 2 +- src/Actors/Blobby/Blobby.tscn | 1 - src/Actors/BlobbyCam.gd | 1 - .../Enemies/{Beings => }/Caterpillar.gd | 0 .../Enemies/{Beings => }/Caterpillar.tscn | 2 +- .../Enemies/{Beings => }/DartingEnemy.gd | 0 .../Enemies/{Beings => }/DartingEnemy.tscn | 2 +- src/Actors/Enemies/{Beings => }/Enemy.gd | 0 src/Actors/Enemies/{Beings => }/Flyer.gd | 0 src/Actors/Enemies/{Beings => }/Flyer.tscn | 10 +- .../Enemies/{Beings => }/SimpleEnemy.gd | 0 .../Enemies/{Beings => }/SimpleEnemy.tscn | 2 +- src/Actors/Enemies/{Beings => }/SmortEnemy.gd | 0 .../Enemies/{Beings => }/SmortEnemy.tscn | 2 +- src/Actors/Enemies/{Machines => }/Timer.gd | 0 src/Actors/Enemies/{Machines => }/Turret.gd | 0 src/Actors/Enemies/{Machines => }/Turret.tscn | 4 +- .../{Machines => }/TurretStateMachine.gd | 0 .../Beings => Friendlies}/BoundFrog.gd | 0 .../Beings => Friendlies}/BoundFrog.tscn | 4 +- .../Beings => Friendlies}/WhatAreFrog.gd | 2 +- .../Beings => Friendlies}/WhatAreFrog.tscn | 4 +- src/BenefitialObjects/Coin.gd | 15 +- src/BenefitialObjects/Coin.tscn | 9 +- src/Levels/1 Tutorial Level.tscn | 2 +- src/Levels/3 Tutorial Level.tscn | 2 +- src/Levels/4 Tutorial Level.tscn | 4 +- src/Levels/5 Tutorial Level.tscn | 2 +- src/Levels/6 Tutorial Level.tscn | 6 +- src/Levels/Actual Level 1.tscn | 6 +- src/Levels/Actual Level 2.tscn | 6 +- src/Levels/Legacy/2 Tut Level.tscn | 4 +- src/Levels/Legacy/3 Tut Level.tscn | 2 +- src/Levels/Level 4.tscn | 4 +- src/Levels/x03 Level.tscn | 4 +- src/Levels/xEnemy Test Level.tscn | 8 +- src/Levels/xFlyer Test Level.tscn | 2 +- src/Levels/xFroggy Test Level.tscn | 4 +- src/Sounds/default_bus_layout.tres | 18 +- src/UserInterface/Buttons/PlayButton.gd | 3 - src/UserInterface/Screens/HUD.tscn | 1 + .../Screens/InGameMenu/PauseScreen.gd | 21 +- .../Screens/InGameMenu/PauseScreen.tscn | 306 ++++++++++++++++-- .../Screens/MainMenu/AudioMenu.gd | 10 + .../Screens/MainMenu/AudioMenu.tscn | 208 +++++++----- .../Screens/MainMenu/AudioSlider.gd | 17 + .../MainMenu/ControlsMenu/InputMapper.gd | 84 ++--- .../Screens/MainMenu/MainScreen.gd | 5 + .../Screens/MainMenu/MainScreen.tscn | 92 +++++- 51 files changed, 685 insertions(+), 210 deletions(-) create mode 100644 assets/ui/simpleGradient.tres rename src/Actors/Enemies/{Beings => }/Caterpillar.gd (100%) rename src/Actors/Enemies/{Beings => }/Caterpillar.tscn (96%) rename src/Actors/Enemies/{Beings => }/DartingEnemy.gd (100%) rename src/Actors/Enemies/{Beings => }/DartingEnemy.tscn (96%) rename src/Actors/Enemies/{Beings => }/Enemy.gd (100%) rename src/Actors/Enemies/{Beings => }/Flyer.gd (100%) rename src/Actors/Enemies/{Beings => }/Flyer.tscn (98%) rename src/Actors/Enemies/{Beings => }/SimpleEnemy.gd (100%) rename src/Actors/Enemies/{Beings => }/SimpleEnemy.tscn (96%) rename src/Actors/Enemies/{Beings => }/SmortEnemy.gd (100%) rename src/Actors/Enemies/{Beings => }/SmortEnemy.tscn (96%) rename src/Actors/Enemies/{Machines => }/Timer.gd (100%) rename src/Actors/Enemies/{Machines => }/Turret.gd (100%) rename src/Actors/Enemies/{Machines => }/Turret.tscn (94%) rename src/Actors/Enemies/{Machines => }/TurretStateMachine.gd (100%) rename src/Actors/{Enemies/Beings => Friendlies}/BoundFrog.gd (100%) rename src/Actors/{Enemies/Beings => Friendlies}/BoundFrog.tscn (75%) rename src/Actors/{Enemies/Beings => Friendlies}/WhatAreFrog.gd (99%) rename src/Actors/{Enemies/Beings => Friendlies}/WhatAreFrog.tscn (99%) create mode 100644 src/UserInterface/Screens/MainMenu/AudioMenu.gd create mode 100644 src/UserInterface/Screens/MainMenu/AudioSlider.gd create mode 100644 src/UserInterface/Screens/MainMenu/MainScreen.gd diff --git a/assets/ui/sci-fi-godot-theme/sci-fi.png b/assets/ui/sci-fi-godot-theme/sci-fi.png index c7ab545e2baf0481dbe9fca07270aba3de3d5e9a..c0130ae60c574f6e5880f65b2f12fe2584a151e7 100644 GIT binary patch delta 4031 zcmV;w4?ytsAjuz)Fn<69XF*Lt006O%3;baP00009a7bBm000id000id0mpBsWB>pU zUP(kjRCr$PoqenwMHz?pLL0dT!iO3RO+f_2w8ij8X=1co#i$6u8_-nR7-J+2v^G+N zXizZ(RH8vCrUFfaF~$@mSW<}y8qf-?mJDYi2BjocuzBspx1PHk3sQ0O0$|wQ% z0Pzr9B~h)FNIaF>;Kt8fzVJFoa7;#WY}&tfUIv`=;k_$P{HN$#uYdMkQ#hU|C#0ND zeYQsttj@PZIU&TEe|?`?o_hPzpd9dpV}GTVkNd}GDt~i8=Rr&IMFP$Xucm;ed|O`n z5WQ2+!I%G9FQFlyZxJk!(3M+Aim~r}{U??2zxDkui|^s61U!UZON>iCB^N%^7C`=L ziU*p=2T;@??$Z5PW-X2bJ0(dw*u@)4OR+gR21fYwsL$bon5X+BXp7g!qivnU(#Vuz`F!lAI9N0^u&%vz@kN z*)7Z0XG>n)EY1NT+?lIZ)0PDxvEGUtaNP2NZD(9Fx9Q}Sw3g^H1p#A_kMWTZ->$ol z-=m6Wm4gLv?#tWlxgW@LD&$y5A71uFlKV{}J%0gXl8^C~@PxCbgCvA}N;sQ*Oalo+ z^2F!HMqd8^QEiI^)Cuv*Ul6knsDrx4a}OL)^+jplUafpOMtzX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i^U$I2G#r@oj@ zuSNT4D6fQikCx`s`qp~Oycm6c)l}T+4)w-TJh>N&C-MWRT@fD zSY?^vN(=x^;nYi!@jSCgay{9MBvc7l*JPY2k9gW@SZ{4$J~%>IixO0000 void: func _on_EnemySkin_area_entered(area:Area2D) -> void: - if area.is_in_group("harmful"): + if area.is_in_group("harmful") && !area.is_in_group("frogfood"): get_node("EnemyBody").disabled = true die() diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.tscn b/src/Actors/Friendlies/WhatAreFrog.tscn similarity index 99% rename from src/Actors/Enemies/Beings/WhatAreFrog.tscn rename to src/Actors/Friendlies/WhatAreFrog.tscn index d8df69f..9a83fb3 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.tscn +++ b/src/Actors/Friendlies/WhatAreFrog.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=49 format=2] [ext_resource path="res://assets/enemy/froshler.png" type="Texture" id=1] -[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=2] +[ext_resource path="res://src/Actors/Friendlies/WhatAreFrog.gd" type="Script" id=2] [ext_resource path="res://src/StateMachines/WhatAreFrogStateMachine.gd" type="Script" id=3] [ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4] [ext_resource path="res://assets/meta/digits.png" type="Texture" id=5] @@ -578,7 +578,7 @@ shape = SubResource( 2 ) process_priority = -1 scale = Vector2( 0.7, 0.7 ) collision_layer = 2 -collision_mask = 126 +collision_mask = 106 [node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"] position = Vector2( 0, -0.738329 ) diff --git a/src/BenefitialObjects/Coin.gd b/src/BenefitialObjects/Coin.gd index 35153cd..9bef6a2 100644 --- a/src/BenefitialObjects/Coin.gd +++ b/src/BenefitialObjects/Coin.gd @@ -6,8 +6,13 @@ onready var levelState := $"%LevelState" export var currencyValue: = 1 func _on_body_entered(_body: Node) -> void: - levelState.currency += currencyValue - $AudioStreamPlayer.play() - anim_player.play("fade_out") - yield($AudioStreamPlayer, "finished") - queue_free() + if $AudioStreamPlayer.playing: + return + levelState.currency += currencyValue + $CollisionShape2D.disabled = true + self.monitoring = false + $AudioStreamPlayer.play() + anim_player.play("fade_out") + +func collected() -> void: + queue_free() diff --git a/src/BenefitialObjects/Coin.tscn b/src/BenefitialObjects/Coin.tscn index 2f2dfd7..d1d39b3 100644 --- a/src/BenefitialObjects/Coin.tscn +++ b/src/BenefitialObjects/Coin.tscn @@ -315,7 +315,7 @@ [ext_resource path="res://assets/neutral object/whitegold orbicle/0285 (Klein)-fs8.png" type="Texture" id=313] [ext_resource path="res://assets/neutral object/whitegold orbicle/0312 (Klein)-fs8.png" type="Texture" id=314] [ext_resource path="res://assets/neutral object/whitegold orbicle/0287 (Klein)-fs8.png" type="Texture" id=315] -[ext_resource path="res://assets/sounds/BrokenWindows3.ogg" type="AudioStream" id=316] +[ext_resource path="res://assets/sounds/MAGIC_SPELL_Attacking_Climbing_Bells_stereo.wav" type="AudioStream" id=316] [ext_resource path="res://assets/environment/blocks/Empty-Navigation-Tile.png" type="Texture" id=317] [sub_resource type="CircleShape2D" id=1] @@ -341,7 +341,7 @@ tracks/1/path = NodePath(".") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false -tracks/1/enabled = true +tracks/1/enabled = false tracks/1/keys = { "times": PoolRealArray( 0.1 ), "transitions": PoolRealArray( 1 ), @@ -465,19 +465,18 @@ rotation = -0.235619 scale = Vector2( 0.036, 0.036 ) frames = SubResource( 4 ) animation = "rotate" -frame = 272 +frame = 32 playing = true [node name="Sprite" type="Sprite" parent="."] material = SubResource( 6 ) position = Vector2( 0.144981, 2.90382 ) -scale = Vector2( 1, 1 ) texture = ExtResource( 317 ) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource( 316 ) -volume_db = -9.044 pitch_scale = 1.1 bus = "Effects" [connection signal="body_entered" from="." to="." method="_on_body_entered"] +[connection signal="finished" from="AudioStreamPlayer" to="." method="collected"] diff --git a/src/Levels/1 Tutorial Level.tscn b/src/Levels/1 Tutorial Level.tscn index d186a74..2e1c110 100644 --- a/src/Levels/1 Tutorial Level.tscn +++ b/src/Levels/1 Tutorial Level.tscn @@ -10,7 +10,7 @@ [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=10] -[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=11] +[ext_resource path="res://src/Actors/Friendlies/WhatAreFrog.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Environment/Grass/ShaderGrass.tscn" type="PackedScene" id=12] [ext_resource path="res://assets/sounds/AMBIENCE_SciFi_Large_Space_Hangar_Deep_Smooth_loop_stereo.wav" type="AudioStream" id=13] [ext_resource path="res://assets/sounds/Hurry! (LOOP).wav" type="AudioStream" id=14] diff --git a/src/Levels/3 Tutorial Level.tscn b/src/Levels/3 Tutorial Level.tscn index 8356208..58507a2 100644 --- a/src/Levels/3 Tutorial Level.tscn +++ b/src/Levels/3 Tutorial Level.tscn @@ -14,7 +14,7 @@ [ext_resource path="res://src/Environment/GreenHouseTiles.tres" type="TileSet" id=12] [ext_resource path="res://src/Environment/DropThroughPlatforms.tres" type="TileSet" id=13] [ext_resource path="res://src/Platforms/FlyingPlatform.tscn" type="PackedScene" id=14] -[ext_resource path="res://src/Actors/Enemies/Beings/Caterpillar.tscn" type="PackedScene" id=15] +[ext_resource path="res://src/Actors/Enemies/Caterpillar.tscn" type="PackedScene" id=15] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=16] [ext_resource path="res://src/Platforms/FlyingPlatformSmol.tscn" type="PackedScene" id=17] diff --git a/src/Levels/4 Tutorial Level.tscn b/src/Levels/4 Tutorial Level.tscn index f0df66c..9a6de87 100644 --- a/src/Levels/4 Tutorial Level.tscn +++ b/src/Levels/4 Tutorial Level.tscn @@ -14,9 +14,9 @@ [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=12] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=13] [ext_resource path="res://src/Contraptions/GateBlock.tscn" type="PackedScene" id=14] -[ext_resource path="res://src/Actors/Enemies/Beings/Caterpillar.tscn" type="PackedScene" id=15] +[ext_resource path="res://src/Actors/Enemies/Caterpillar.tscn" type="PackedScene" id=15] [ext_resource path="res://src/Platforms/FlyingPlatform.tscn" type="PackedScene" id=16] -[ext_resource path="res://src/Actors/Enemies/Beings/DartingEnemy.tscn" type="PackedScene" id=17] +[ext_resource path="res://src/Actors/Enemies/DartingEnemy.tscn" type="PackedScene" id=17] [ext_resource path="res://src/Contraptions/Triggers/GateButton.tscn" type="PackedScene" id=18] [ext_resource path="res://src/Platforms/FlyingLaserCutter.tscn" type="PackedScene" id=19] diff --git a/src/Levels/5 Tutorial Level.tscn b/src/Levels/5 Tutorial Level.tscn index b0e6c34..93b442d 100644 --- a/src/Levels/5 Tutorial Level.tscn +++ b/src/Levels/5 Tutorial Level.tscn @@ -12,7 +12,7 @@ [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=10] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Platforms/FlyingPlatformSmol.tscn" type="PackedScene" id=12] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=13] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=13] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=14] [ext_resource path="res://src/Contraptions/VendingMachine.tscn" type="PackedScene" id=19] diff --git a/src/Levels/6 Tutorial Level.tscn b/src/Levels/6 Tutorial Level.tscn index 3dd2b8d..a052555 100644 --- a/src/Levels/6 Tutorial Level.tscn +++ b/src/Levels/6 Tutorial Level.tscn @@ -12,12 +12,12 @@ [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=10] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Contraptions/GateBlock.tscn" type="PackedScene" id=12] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.gd" type="Script" id=13] +[ext_resource path="res://src/Actors/Enemies/Flyer.gd" type="Script" id=13] [ext_resource path="res://src/StateMachines/FlyerStateMachine.gd" type="Script" id=14] [ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=15] [ext_resource path="res://assets/enemy/flyer-sheet.png" type="Texture" id=16] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.gd" type="Script" id=17] -[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=18] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.gd" type="Script" id=17] +[ext_resource path="res://src/Actors/Friendlies/WhatAreFrog.tscn" type="PackedScene" id=18] [ext_resource path="res://src/Contraptions/Rope/RopeAnchor.tscn" type="PackedScene" id=19] [ext_resource path="res://src/Contraptions/Triggers/GateButton.tscn" type="PackedScene" id=20] [ext_resource path="res://src/Contraptions/Triggers/FrogFreeButton.tscn" type="PackedScene" id=21] diff --git a/src/Levels/Actual Level 1.tscn b/src/Levels/Actual Level 1.tscn index 13cccc6..c270d50 100644 --- a/src/Levels/Actual Level 1.tscn +++ b/src/Levels/Actual Level 1.tscn @@ -1,15 +1,15 @@ [gd_scene load_steps=21 format=2] -[ext_resource path="res://src/Actors/Enemies/Beings/DartingEnemy.tscn" type="PackedScene" id=1] +[ext_resource path="res://src/Actors/Enemies/DartingEnemy.tscn" type="PackedScene" id=1] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=2] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=3] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Contraptions/Triggers/GateButton.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Contraptions/GateBlock.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Platforms/legacy/DropThroughPlatform.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Contraptions/Triggers/FrogFreeButton.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=9] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=10] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=10] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Platforms/Spring/Spring.tscn" type="PackedScene" id=12] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=13] diff --git a/src/Levels/Actual Level 2.tscn b/src/Levels/Actual Level 2.tscn index 587836e..aa8cd05 100644 --- a/src/Levels/Actual Level 2.tscn +++ b/src/Levels/Actual Level 2.tscn @@ -8,9 +8,9 @@ [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Environment/Legacy/AlienShipTileSet.tres" type="TileSet" id=8] [ext_resource path="res://src/Levels/Templates/LevelTemplate.gd" type="Script" id=9] -[ext_resource path="res://src/Actors/Enemies/Beings/SimpleEnemy.tscn" type="PackedScene" id=10] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=11] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=12] +[ext_resource path="res://src/Actors/Enemies/SimpleEnemy.tscn" type="PackedScene" id=10] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=11] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=12] [ext_resource path="res://src/Contraptions/Triggers/FrogFreeButton.tscn" type="PackedScene" id=13] [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=14] [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=15] diff --git a/src/Levels/Legacy/2 Tut Level.tscn b/src/Levels/Legacy/2 Tut Level.tscn index a26d9a6..ade125d 100644 --- a/src/Levels/Legacy/2 Tut Level.tscn +++ b/src/Levels/Legacy/2 Tut Level.tscn @@ -3,14 +3,14 @@ [ext_resource path="res://src/ObstacleObjects/PitArea.tscn" type="PackedScene" id=1] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=2] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=3] -[ext_resource path="res://src/Actors/Enemies/Beings/SimpleEnemy.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Actors/Enemies/SimpleEnemy.tscn" type="PackedScene" id=4] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=6] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Environment/Grass/ShaderGrass.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=10] -[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.tscn" type="PackedScene" id=11] +[ext_resource path="res://src/Actors/Friendlies/WhatAreFrog.tscn" type="PackedScene" id=11] [ext_resource path="res://src/BenefitialObjects/SavePoint.tscn" type="PackedScene" id=12] [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=13] [ext_resource path="res://src/Platforms/legacy/DropThroughPlatform.tscn" type="PackedScene" id=14] diff --git a/src/Levels/Legacy/3 Tut Level.tscn b/src/Levels/Legacy/3 Tut Level.tscn index b24992d..f9e9f05 100644 --- a/src/Levels/Legacy/3 Tut Level.tscn +++ b/src/Levels/Legacy/3 Tut Level.tscn @@ -9,7 +9,7 @@ [ext_resource path="res://src/Platforms/legacy/FlyingPlatformClean.tscn" type="PackedScene" id=40] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=41] [ext_resource path="res://src/Platforms/legacy/DropThroughPlatform.tscn" type="PackedScene" id=42] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=45] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=45] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=46] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=47] [ext_resource path="res://src/Levels/Level 3.gd" type="Script" id=48] diff --git a/src/Levels/Level 4.tscn b/src/Levels/Level 4.tscn index 9c3540d..1640daf 100644 --- a/src/Levels/Level 4.tscn +++ b/src/Levels/Level 4.tscn @@ -4,8 +4,8 @@ [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=2] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=4] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=6] [ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=8] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=9] diff --git a/src/Levels/x03 Level.tscn b/src/Levels/x03 Level.tscn index 8a6e614..01e8b78 100644 --- a/src/Levels/x03 Level.tscn +++ b/src/Levels/x03 Level.tscn @@ -38,13 +38,13 @@ [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=36] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=37] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=38] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=39] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=39] [ext_resource path="res://src/Platforms/legacy/FlyingPlatformClean.tscn" type="PackedScene" id=40] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=41] [ext_resource path="res://src/Platforms/legacy/DropThroughPlatform.tscn" type="PackedScene" id=42] [ext_resource path="res://src/Contraptions/Triggers/FrogFreeButton.tscn" type="PackedScene" id=43] [ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=44] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=45] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=45] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=46] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=47] diff --git a/src/Levels/xEnemy Test Level.tscn b/src/Levels/xEnemy Test Level.tscn index d531d88..2d2f5be 100644 --- a/src/Levels/xEnemy Test Level.tscn +++ b/src/Levels/xEnemy Test Level.tscn @@ -4,11 +4,11 @@ [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=2] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=3] [ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=4] -[ext_resource path="res://src/Actors/Enemies/Beings/SmortEnemy.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/Actors/Enemies/Beings/SimpleEnemy.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/Actors/Enemies/SmortEnemy.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/Actors/Enemies/SimpleEnemy.tscn" type="PackedScene" id=6] [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Actors/Enemies/Beings/Caterpillar.tscn" type="PackedScene" id=8] -[ext_resource path="res://src/Actors/Enemies/Beings/DartingEnemy.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Actors/Enemies/Caterpillar.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Actors/Enemies/DartingEnemy.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=10] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=11] diff --git a/src/Levels/xFlyer Test Level.tscn b/src/Levels/xFlyer Test Level.tscn index 64f39d4..2246437 100644 --- a/src/Levels/xFlyer Test Level.tscn +++ b/src/Levels/xFlyer Test Level.tscn @@ -6,7 +6,7 @@ [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=5] [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Levels/xEnemy Test Level.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=8] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=10] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=12] diff --git a/src/Levels/xFroggy Test Level.tscn b/src/Levels/xFroggy Test Level.tscn index 0a7cc48..304729b 100644 --- a/src/Levels/xFroggy Test Level.tscn +++ b/src/Levels/xFroggy Test Level.tscn @@ -7,12 +7,12 @@ [ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Levels/xEnemy Test Level.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Platforms/FlyingLaserCutter.tscn" type="PackedScene" id=8] -[ext_resource path="res://src/Actors/Enemies/Beings/BoundFrog.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Actors/Friendlies/BoundFrog.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=10] [ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=11] [ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=12] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=13] -[ext_resource path="res://src/Actors/Enemies/Beings/Flyer.tscn" type="PackedScene" id=14] +[ext_resource path="res://src/Actors/Enemies/Flyer.tscn" type="PackedScene" id=14] [ext_resource path="res://src/Platforms/Spring/SpringPlatform.tscn" type="PackedScene" id=15] [ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=16] [ext_resource path="res://src/Utilities/LevelState.tscn" type="PackedScene" id=17] diff --git a/src/Sounds/default_bus_layout.tres b/src/Sounds/default_bus_layout.tres index 30cfee9..fe2aa04 100644 --- a/src/Sounds/default_bus_layout.tres +++ b/src/Sounds/default_bus_layout.tres @@ -1,4 +1,4 @@ -[gd_resource type="AudioBusLayout" load_steps=7 format=2] +[gd_resource type="AudioBusLayout" load_steps=9 format=2] [sub_resource type="AudioEffectPitchShift" id=1] resource_name = "PitchShift" @@ -33,13 +33,19 @@ resource_name = "Phaser" [sub_resource type="AudioEffectCompressor" id=6] resource_name = "Compressor" +[sub_resource type="AudioEffectHighPassFilter" id=7] +resource_name = "HighPassFilter" + +[sub_resource type="AudioEffectLowPassFilter" id=8] +resource_name = "LowPassFilter" +cutoff_hz = 3000.0 + [resource] -bus/0/volume_db = -0.0705032 bus/1/name = "Music" bus/1/solo = false bus/1/mute = false bus/1/bypass_fx = false -bus/1/volume_db = -0.00606537 +bus/1/volume_db = 0.0 bus/1/send = "Master" bus/1/effect/0/effect = SubResource( 1 ) bus/1/effect/0/enabled = false @@ -61,7 +67,11 @@ bus/3/name = "UI" bus/3/solo = false bus/3/mute = false bus/3/bypass_fx = false -bus/3/volume_db = -0.0727253 +bus/3/volume_db = 0.0 bus/3/send = "Master" bus/3/effect/0/effect = SubResource( 6 ) bus/3/effect/0/enabled = true +bus/3/effect/1/effect = SubResource( 7 ) +bus/3/effect/1/enabled = false +bus/3/effect/2/effect = SubResource( 8 ) +bus/3/effect/2/enabled = true diff --git a/src/UserInterface/Buttons/PlayButton.gd b/src/UserInterface/Buttons/PlayButton.gd index 79dd5ee..27f42b8 100644 --- a/src/UserInterface/Buttons/PlayButton.gd +++ b/src/UserInterface/Buttons/PlayButton.gd @@ -3,9 +3,6 @@ extends AudibleButton export(String, FILE) var next_scene_path: String = "" onready var selected_level_base_path: String = "res://src/Levels/" -func _ready(): - self.grab_focus() - func _on_button_up() -> void: get_tree().change_scene(next_scene_path) get_tree().get_current_scene().queue_free() diff --git a/src/UserInterface/Screens/HUD.tscn b/src/UserInterface/Screens/HUD.tscn index 1f5b0d3..38622de 100644 --- a/src/UserInterface/Screens/HUD.tscn +++ b/src/UserInterface/Screens/HUD.tscn @@ -37,6 +37,7 @@ tracks/0/keys = { [node name="HUD" type="Control"] pause_mode = 2 +visible = false anchor_right = 1.0 anchor_bottom = 1.0 mouse_filter = 1 diff --git a/src/UserInterface/Screens/InGameMenu/PauseScreen.gd b/src/UserInterface/Screens/InGameMenu/PauseScreen.gd index 3630d19..c4e0625 100644 --- a/src/UserInterface/Screens/InGameMenu/PauseScreen.gd +++ b/src/UserInterface/Screens/InGameMenu/PauseScreen.gd @@ -4,7 +4,7 @@ extends Control onready var signalManager := get_tree().root.get_child(4).get_node("%SignalManager") onready var levelState := get_tree().root.get_child(4).get_node("%LevelState") onready var current_scene := get_tree().get_current_scene() -onready var pause_overlay: ColorRect = get_node("PauseOverlay") +onready var pause_overlay: = get_node("PauseOverlay") onready var pause_title: Label = get_node("PauseOverlay/Title") var paused := false setget set_paused @@ -13,9 +13,25 @@ var block_ui_cancel = false func _ready(): #signalManager.connect("player_died", self, "_on_GlobalState_player_died") $ControlsMenu.visible = false + $ControlsMenu.set_process_input(false) + $AudioMenu.set_process_input(false) signalManager.connect("game_paused", self, "set_paused") pass +func open_audio_menu(): + block_ui_cancel = true + pause_overlay.visible = false + $AudioMenu.visible = true + $AudioMenu.set_process_input(true) + $"%MasterSlider".grab_focus() + +func close_audio_menu(): + $AudioMenu.visible = false + pause_overlay.visible = true + $AudioMenu.set_process_input(false) + $"%Continue".grab_focus() + get_tree().set_input_as_handled() + func _on_GlobalState_player_died() -> void: self.paused = true @@ -46,6 +62,7 @@ func set_paused(value: bool) -> void: func _on_Controls_button_up() -> void: $ControlsMenu.visible = true + $ControlsMenu.set_process_input(true) block_ui_cancel = true - $PauseOverlay.visible = false + pause_overlay.visible = false $"%ProfilesMenu".grab_focus() diff --git a/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn b/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn index 2fa9ad8..835bd9d 100644 --- a/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn +++ b/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=34 format=2] +[gd_scene load_steps=39 format=2] [ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=1] [ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi-theme.tres" type="Theme" id=2] @@ -19,11 +19,26 @@ [ext_resource path="res://src/UserInterface/Screens/MainMenu/ControlsMenu/ProfilesMenu.gd" type="Script" id=17] [ext_resource path="res://assets/ui/fonts/Kenney Thick.ttf" type="DynamicFontData" id=18] [ext_resource path="res://assets/ui/fonts/kenny_thick.tres" type="DynamicFont" id=19] -[ext_resource path="res://src/UserInterface/Buttons/AudibleButton.gd" type="Script" id=20] [ext_resource path="res://assets/ui/Screenshot 2023-05-23 160521.png" type="Texture" id=21] [ext_resource path="res://assets/meta/montserrat_extrabold.otf" type="DynamicFontData" id=22] [ext_resource path="res://src/UserInterface/Buttons/AudibleButton.gd" type="Script" id=23] [ext_resource path="res://assets/sounds/Shopping For The Future (LOOP).wav" type="AudioStream" id=24] +[ext_resource path="res://src/UserInterface/Screens/MainMenu/AudioMenu.gd" type="Script" id=26] +[ext_resource path="res://src/UserInterface/Screens/MainMenu/AudioSlider.gd" type="Script" id=28] +[ext_resource path="res://src/UserInterface/Buttons/MenuNavigationButton.gd" type="Script" id=29] + +[sub_resource type="Gradient" id=17] +interpolation_mode = 2 +offsets = PoolRealArray( 0, 0.797721 ) +colors = PoolColorArray( 0, 0, 0, 0, 0, 0, 0, 0.419608 ) + +[sub_resource type="GradientTexture2D" id=14] +gradient = SubResource( 17 ) +width = 640 +height = 360 +fill = 1 +fill_from = Vector2( 0.5, 0.5 ) +fill_to = Vector2( 1, 1 ) [sub_resource type="DynamicFont" id=1] size = 42 @@ -56,6 +71,10 @@ shader_param/transparency = 0.778 size = 20 font_data = ExtResource( 22 ) +[sub_resource type="DynamicFont" id=16] +size = 42 +font_data = ExtResource( 22 ) + [sub_resource type="DynamicFont" id=9] size = 20 font_data = ExtResource( 18 ) @@ -69,7 +88,6 @@ theme = ExtResource( 2 ) script = ExtResource( 5 ) [node name="ControlsMenu" type="Control" parent="."] -pause_mode = 2 physics_interpolation_mode = 1 unique_name_in_owner = true visible = false @@ -81,10 +99,10 @@ size_flags_vertical = 0 theme = ExtResource( 1 ) script = ExtResource( 10 ) -[node name="PauseOverlay" type="ColorRect" parent="ControlsMenu"] +[node name="GradientTexture" type="TextureRect" parent="ControlsMenu"] anchor_right = 1.0 anchor_bottom = 1.0 -color = Color( 0, 0, 0, 0.156863 ) +texture = SubResource( 14 ) [node name="InputMapper" type="Node" parent="ControlsMenu"] unique_name_in_owner = true @@ -431,12 +449,248 @@ custom_fonts/font = ExtResource( 19 ) text = "Quit Don't Save" script = ExtResource( 23 ) -[node name="PauseOverlay" type="ColorRect" parent="."] +[node name="AudioMenu" type="Control" parent="."] +physics_interpolation_mode = 1 +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +input_pass_on_modal_close_click = false +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme = ExtResource( 2 ) +script = ExtResource( 26 ) + +[node name="GradientTexture" type="TextureRect" parent="AudioMenu"] +anchor_right = 1.0 +anchor_bottom = 1.0 +texture = SubResource( 14 ) + +[node name="Titel" type="Label" parent="AudioMenu"] +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -170.0 +margin_right = 170.0 +margin_bottom = 52.0 +grow_horizontal = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +custom_fonts/font = SubResource( 16 ) +text = "Audio Menu" +align = 1 +valign = 1 + +[node name="Panel" type="Panel" parent="AudioMenu"] +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -310.0 +margin_top = -300.0 +margin_right = 310.0 +margin_bottom = -10.0 +grow_horizontal = 2 +grow_vertical = 2 +focus_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme = ExtResource( 2 ) + +[node name="Back" type="Button" parent="AudioMenu/Panel"] +anchor_left = 0.5 +anchor_top = 0.95 +anchor_right = 0.5 +anchor_bottom = 0.95 +margin_left = -68.0 +margin_top = -24.95 +margin_right = 69.8 +margin_bottom = 0.0499878 +grow_horizontal = 2 +grow_vertical = 2 +rect_min_size = Vector2( 40, 20 ) +input_pass_on_modal_close_click = false +size_flags_horizontal = 0 +size_flags_vertical = 0 +theme = ExtResource( 2 ) +text = "Back" +script = ExtResource( 29 ) +next_screen_path = "res://src/UserInterface/Screens/MainMenu/MainScreen.tscn" + +[node name="KeymapViewer" type="VBoxContainer" parent="AudioMenu/Panel"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -200.0 +margin_top = -130.0 +margin_right = 200.0 +margin_bottom = 114.0 +grow_horizontal = 2 +grow_vertical = 2 +custom_constants/separation = 40 + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer"] +margin_right = 400.0 +margin_bottom = 9.0 +text = "Volume" +align = 1 + +[node name="HSplitContainer" type="GridContainer" parent="AudioMenu/Panel/KeymapViewer"] +margin_top = 49.0 +margin_right = 400.0 +margin_bottom = 244.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +custom_constants/hseparation = 50 +columns = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer"] +margin_right = 57.0 +margin_bottom = 195.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +alignment = 1 + +[node name="Label4" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_right = 57.0 +margin_bottom = 45.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "Master" +align = 1 + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_top = 49.0 +margin_right = 57.0 +margin_bottom = 95.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "Music" +align = 1 + +[node name="Label2" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_top = 99.0 +margin_right = 57.0 +margin_bottom = 145.0 +size_flags_vertical = 3 +text = "Effects" +align = 1 + +[node name="Label3" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_top = 149.0 +margin_right = 57.0 +margin_bottom = 195.0 +size_flags_vertical = 3 +text = "UI" +align = 1 + +[node name="VBoxContainer2" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer"] +margin_left = 107.0 +margin_right = 400.0 +margin_bottom = 195.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +alignment = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_right = 293.0 +margin_bottom = 45.0 +size_flags_vertical = 3 + +[node name="MasterSlider" type="HSlider" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer"] +unique_name_in_owner = true +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 1 +script = ExtResource( 28 ) + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer/MasterSlider"] +margin_top = 11.0 +margin_right = 271.0 +margin_bottom = 20.0 +rect_scale = Vector2( 1.08059, 1 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "80%" +align = 1 +valign = 1 + +[node name="VBoxContainer2" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_top = 49.0 +margin_right = 293.0 +margin_bottom = 56.0 +size_flags_vertical = 2 + +[node name="HSlider" type="HSlider" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer2"] +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 2 +script = ExtResource( 28 ) +audio_bus = "Music" + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer2/HSlider"] +margin_top = 11.0 +margin_right = 293.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "80" +align = 1 + +[node name="VBoxContainer3" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_top = 99.0 +margin_right = 293.0 +margin_bottom = 145.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 + +[node name="HSlider3" type="HSlider" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer3"] +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 1 +script = ExtResource( 28 ) +audio_bus = "Effects" + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer3/HSlider3"] +margin_top = 11.0 +margin_right = 292.0 +margin_bottom = 20.0 +text = "80" +align = 1 + +[node name="VBoxContainer4" type="VBoxContainer" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_top = 149.0 +margin_right = 293.0 +margin_bottom = 195.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 + +[node name="HSlider3" type="HSlider" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer4"] +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 1 +script = ExtResource( 28 ) +audio_bus = "UI" + +[node name="Label" type="Label" parent="AudioMenu/Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer4/HSlider3"] +margin_top = 11.0 +margin_right = 293.0 +margin_bottom = 20.0 +text = "80" +align = 1 + +[node name="PauseOverlay" type="TextureRect" parent="."] +physics_interpolation_mode = 1 unique_name_in_owner = true visible = false anchor_right = 1.0 anchor_bottom = 1.0 -color = Color( 0, 0, 0, 0.235294 ) +texture = SubResource( 14 ) [node name="Title" type="Label" parent="PauseOverlay"] margin_right = 170.0 @@ -448,10 +702,10 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -119.5 -margin_top = -138.5 -margin_right = 119.5 -margin_bottom = 138.5 +margin_left = -119.0 +margin_top = -120.0 +margin_right = 120.0 +margin_bottom = 149.0 theme = ExtResource( 2 ) [node name="VBoxContainer" type="VBoxContainer" parent="PauseOverlay/Panel"] @@ -468,7 +722,7 @@ focus_mode = 2 [node name="Continue" type="Button" parent="PauseOverlay/Panel/VBoxContainer"] unique_name_in_owner = true margin_right = 222.0 -margin_bottom = 59.0 +margin_bottom = 46.0 focus_neighbour_top = NodePath("../MainMenuButton") focus_neighbour_bottom = NodePath("../Controls") size_flags_vertical = 3 @@ -476,24 +730,34 @@ text = "Continue" script = ExtResource( 6 ) [node name="Controls" type="Button" parent="PauseOverlay/Panel/VBoxContainer"] -margin_top = 63.0 +margin_top = 50.0 margin_right = 222.0 -margin_bottom = 123.0 +margin_bottom = 97.0 focus_neighbour_top = NodePath("../Continue") -focus_neighbour_bottom = NodePath("../RetryButton") +focus_neighbour_bottom = NodePath("../Audio") size_flags_vertical = 3 text = "Controls" -script = ExtResource( 20 ) +script = ExtResource( 23 ) + +[node name="Audio" type="Button" parent="PauseOverlay/Panel/VBoxContainer"] +margin_top = 101.0 +margin_right = 222.0 +margin_bottom = 148.0 +focus_neighbour_top = NodePath("../Controls") +focus_neighbour_bottom = NodePath("../RetryButton") +size_flags_vertical = 3 +text = "Audio" +script = ExtResource( 23 ) [node name="RetryButton" parent="PauseOverlay/Panel/VBoxContainer" instance=ExtResource( 4 )] -margin_top = 127.0 +margin_top = 152.0 margin_right = 222.0 -margin_bottom = 186.0 -focus_neighbour_top = NodePath("../Controls") +margin_bottom = 199.0 +focus_neighbour_top = NodePath("../Audio") focus_neighbour_bottom = NodePath("../MainMenuButton") [node name="MainMenuButton" parent="PauseOverlay/Panel/VBoxContainer" instance=ExtResource( 3 )] -margin_top = 190.0 +margin_top = 203.0 margin_right = 222.0 margin_bottom = 250.0 focus_neighbour_top = NodePath("../RetryButton") @@ -526,5 +790,7 @@ volume_db = -10.0 [connection signal="button_up" from="ControlsMenu/ReallyQuitMenu/VBoxContainer/SaveNQuit" to="ControlsMenu/ReallyQuitMenu/VBoxContainer/SaveNQuit" method="_on_button_up"] [connection signal="button_up" from="ControlsMenu/ReallyQuitMenu/VBoxContainer/ContinueEdit" to="ControlsMenu/ReallyQuitMenu" method="close"] [connection signal="button_up" from="ControlsMenu/ReallyQuitMenu/VBoxContainer/QuitDontSave" to="ControlsMenu" method="close"] +[connection signal="button_up" from="AudioMenu/Panel/Back" to="." method="close_audio_menu"] [connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Continue" to="PauseOverlay/Panel/VBoxContainer/Continue" method="_on_button_up"] [connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Controls" to="." method="_on_Controls_button_up"] +[connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Audio" to="." method="open_audio_menu"] diff --git a/src/UserInterface/Screens/MainMenu/AudioMenu.gd b/src/UserInterface/Screens/MainMenu/AudioMenu.gd new file mode 100644 index 0000000..002c334 --- /dev/null +++ b/src/UserInterface/Screens/MainMenu/AudioMenu.gd @@ -0,0 +1,10 @@ +extends Control + + +func _ready() -> void: + if visible: + $"%MasterSlider".grab_focus() + +func _input(event: InputEvent) -> void: + if visible && event.is_action("ui_cancel"): + $Panel/Back.emit_signal("button_up") diff --git a/src/UserInterface/Screens/MainMenu/AudioMenu.tscn b/src/UserInterface/Screens/MainMenu/AudioMenu.tscn index b57a66c..f99be28 100644 --- a/src/UserInterface/Screens/MainMenu/AudioMenu.tscn +++ b/src/UserInterface/Screens/MainMenu/AudioMenu.tscn @@ -1,19 +1,31 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=11 format=2] -[ext_resource path="res://src/UserInterface/Screens/MainMenu/ControlsMenu/SavedCheckBackButton.gd" type="Script" id=2] -[ext_resource path="res://src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.gd" type="Script" id=5] -[ext_resource path="res://src/Utilities/SignalManager.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/UserInterface/Screens/MainMenu/AudioSlider.gd" type="Script" id=1] +[ext_resource path="res://src/UserInterface/Buttons/MenuNavigationButton.gd" type="Script" id=2] +[ext_resource path="res://src/UserInterface/Screens/MainMenu/AudioMenu.gd" type="Script" id=3] [ext_resource path="res://assets/environment/background/Spaceship-Wall.png" type="Texture" id=9] [ext_resource path="res://assets/environment/background/starry-space.png" type="Texture" id=10] -[ext_resource path="res://src/UserInterface/Screens/MainMenu/ControlsMenu/InputMapper.gd" type="Script" id=15] [ext_resource path="res://assets/meta/montserrat_extrabold.otf" type="DynamicFontData" id=18] [ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi-theme.tres" type="Theme" id=20] -[sub_resource type="DynamicFont" id=1] +[sub_resource type="Gradient" id=15] +interpolation_mode = 2 +offsets = PoolRealArray( 0, 0.797721 ) +colors = PoolColorArray( 0, 0, 0, 0, 0, 0, 0, 0.419608 ) + +[sub_resource type="GradientTexture2D" id=17] +gradient = SubResource( 15 ) +width = 640 +height = 360 +fill = 1 +fill_from = Vector2( 0.5, 0.5 ) +fill_to = Vector2( 1, 1 ) + +[sub_resource type="DynamicFont" id=16] size = 42 font_data = ExtResource( 18 ) -[node name="ControlsMenu" type="Control"] +[node name="AudioMenu" type="Control"] pause_mode = 1 anchor_right = 1.0 anchor_bottom = 1.0 @@ -23,13 +35,7 @@ input_pass_on_modal_close_click = false size_flags_horizontal = 3 size_flags_vertical = 3 theme = ExtResource( 20 ) -script = ExtResource( 5 ) - -[node name="SignalManager" parent="." instance=ExtResource( 7 )] - -[node name="InputMapper" type="Node" parent="."] -unique_name_in_owner = true -script = ExtResource( 15 ) +script = ExtResource( 3 ) [node name="background" type="TextureRect" parent="."] anchor_right = 1.0 @@ -47,6 +53,11 @@ texture = ExtResource( 9 ) expand = true stretch_mode = 1 +[node name="GradientTexture" type="TextureRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +texture = SubResource( 17 ) + [node name="Titel" type="Label" parent="."] anchor_left = 0.5 anchor_right = 0.5 @@ -56,7 +67,7 @@ margin_bottom = 52.0 grow_horizontal = 2 size_flags_horizontal = 0 size_flags_vertical = 0 -custom_fonts/font = SubResource( 1 ) +custom_fonts/font = SubResource( 16 ) text = "Audio Menu" align = 1 valign = 1 @@ -98,120 +109,169 @@ text = "Back" script = ExtResource( 2 ) next_screen_path = "res://src/UserInterface/Screens/MainMenu/MainScreen.tscn" -[node name="KeymapViewer" type="VSplitContainer" parent="Panel"] +[node name="KeymapViewer" type="VBoxContainer" parent="Panel"] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -271.0 -margin_top = -136.0 -margin_right = 271.0 +margin_left = -200.0 +margin_top = -130.0 +margin_right = 200.0 margin_bottom = 114.0 grow_horizontal = 2 grow_vertical = 2 -split_offset = 23 +custom_constants/separation = 40 [node name="Label" type="Label" parent="Panel/KeymapViewer"] -margin_top = 11.0 -margin_right = 542.0 -margin_bottom = 20.0 +margin_right = 400.0 +margin_bottom = 9.0 text = "Volume" align = 1 -[node name="HSplitContainer" type="HSplitContainer" parent="Panel/KeymapViewer"] -margin_top = 44.0 -margin_right = 542.0 -margin_bottom = 250.0 -size_flags_vertical = 3 -split_offset = 200 - -[node name="VBoxContainer" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer"] -margin_right = 257.0 -margin_bottom = 206.0 +[node name="HSplitContainer" type="GridContainer" parent="Panel/KeymapViewer"] +margin_top = 49.0 +margin_right = 400.0 +margin_bottom = 244.0 grow_horizontal = 2 grow_vertical = 2 +size_flags_vertical = 3 +custom_constants/hseparation = 50 +columns = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer"] +margin_right = 57.0 +margin_bottom = 195.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 alignment = 1 -[node name="Label3" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer"] -margin_right = 257.0 -margin_bottom = 66.0 +[node name="Label4" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_right = 57.0 +margin_bottom = 45.0 +size_flags_horizontal = 3 size_flags_vertical = 3 -text = "UI" +text = "Master" align = 1 [node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer"] -margin_top = 70.0 -margin_right = 257.0 -margin_bottom = 136.0 +margin_top = 49.0 +margin_right = 57.0 +margin_bottom = 95.0 size_flags_horizontal = 3 size_flags_vertical = 3 text = "Music" align = 1 [node name="Label2" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer"] -margin_top = 140.0 -margin_right = 257.0 -margin_bottom = 206.0 +margin_top = 99.0 +margin_right = 57.0 +margin_bottom = 145.0 size_flags_vertical = 3 text = "Effects" align = 1 -[node name="VBoxContainer2" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer"] -margin_left = 269.0 -margin_right = 542.0 -margin_bottom = 206.0 - -[node name="VBoxContainer" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] -margin_right = 273.0 -margin_bottom = 66.0 +[node name="Label3" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer"] +margin_top = 149.0 +margin_right = 57.0 +margin_bottom = 195.0 size_flags_vertical = 3 - -[node name="HSlider2" type="HSlider" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer"] -margin_right = 273.0 -margin_bottom = 7.0 -size_flags_vertical = 1 - -[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer"] -margin_top = 11.0 -margin_right = 273.0 -margin_bottom = 20.0 -text = "80%" +text = "UI" align = 1 +[node name="VBoxContainer2" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer"] +margin_left = 107.0 +margin_right = 400.0 +margin_bottom = 195.0 +size_flags_horizontal = 7 +size_flags_vertical = 3 +alignment = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_right = 293.0 +margin_bottom = 45.0 +size_flags_vertical = 3 + +[node name="MasterSlider" type="HSlider" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer"] +unique_name_in_owner = true +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 1 +script = ExtResource( 1 ) + +[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer/MasterSlider"] +margin_top = 11.0 +margin_right = 271.0 +margin_bottom = 20.0 +rect_scale = Vector2( 1.08059, 1 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +text = "80%" +align = 1 +valign = 1 + [node name="VBoxContainer2" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] -margin_top = 70.0 -margin_right = 273.0 -margin_bottom = 90.0 +margin_top = 49.0 +margin_right = 293.0 +margin_bottom = 56.0 size_flags_vertical = 2 [node name="HSlider" type="HSlider" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer2"] -margin_right = 273.0 +margin_right = 293.0 margin_bottom = 7.0 size_flags_vertical = 2 +script = ExtResource( 1 ) +audio_bus = "Music" -[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer2"] +[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer2/HSlider"] margin_top = 11.0 -margin_right = 273.0 +margin_right = 293.0 margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 text = "80" align = 1 [node name="VBoxContainer3" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] -margin_top = 140.0 -margin_right = 273.0 -margin_bottom = 206.0 +margin_top = 99.0 +margin_right = 293.0 +margin_bottom = 145.0 grow_horizontal = 2 grow_vertical = 2 size_flags_vertical = 3 [node name="HSlider3" type="HSlider" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer3"] -margin_right = 273.0 +margin_right = 293.0 margin_bottom = 7.0 size_flags_vertical = 1 +script = ExtResource( 1 ) +audio_bus = "Effects" -[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer3"] +[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer3/HSlider3"] margin_top = 11.0 -margin_right = 273.0 +margin_right = 292.0 +margin_bottom = 20.0 +text = "80" +align = 1 + +[node name="VBoxContainer4" type="VBoxContainer" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2"] +margin_top = 149.0 +margin_right = 293.0 +margin_bottom = 195.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 + +[node name="HSlider3" type="HSlider" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer4"] +margin_right = 293.0 +margin_bottom = 7.0 +size_flags_vertical = 1 +script = ExtResource( 1 ) +audio_bus = "UI" + +[node name="Label" type="Label" parent="Panel/KeymapViewer/HSplitContainer/VBoxContainer2/VBoxContainer4/HSlider3"] +margin_top = 11.0 +margin_right = 293.0 margin_bottom = 20.0 text = "80" align = 1 diff --git a/src/UserInterface/Screens/MainMenu/AudioSlider.gd b/src/UserInterface/Screens/MainMenu/AudioSlider.gd new file mode 100644 index 0000000..26f1ba8 --- /dev/null +++ b/src/UserInterface/Screens/MainMenu/AudioSlider.gd @@ -0,0 +1,17 @@ +extends HSlider + +export(String) var audio_bus := "Master" +onready var _bus := AudioServer.get_bus_index(audio_bus) + +func _ready() -> void: + min_value = 0.0 + max_value = 1.0 + step = 0.01 + self.connect("value_changed", self, "_on_Slider_value_changed") + value = db2linear(AudioServer.get_bus_volume_db(_bus)) + $Label.text = str(value*100) + +func _on_Slider_value_changed(value: float) -> void: + AudioServer.set_bus_volume_db(_bus, linear2db(value)) + $Label.text = str(value*100) + diff --git a/src/UserInterface/Screens/MainMenu/ControlsMenu/InputMapper.gd b/src/UserInterface/Screens/MainMenu/ControlsMenu/InputMapper.gd index afbd095..283f461 100644 --- a/src/UserInterface/Screens/MainMenu/ControlsMenu/InputMapper.gd +++ b/src/UserInterface/Screens/MainMenu/ControlsMenu/InputMapper.gd @@ -5,63 +5,63 @@ signal profile_changed(new_profile) var current_profile_id = 0 var profiles = { - 0: 'keyboard', - 1: 'controller' + 0: 'keyboard', + 1: 'controller' } var keyboard = {} var controller = {} func change_profile(id): - current_profile_id = id - var profile = get(profiles[id]) - - for action_name in profile.keys(): - change_action_key(action_name, profile[action_name]) - emit_signal('profile_changed', profile) - return profile + current_profile_id = id + var profile = get(profiles[id]) + + for action_name in profile.keys(): + change_action_key(action_name, profile[action_name]) + emit_signal('profile_changed', profile) + return profile func commit_to_changes(): - for profile_name in profiles.values(): - var profile = get(profile_name) - for action_name in profile.keys(): - if(action_name.ends_with("_old")): - continue - erase_old_action_event(action_name) - profile[action_name + "_old"] = profile[action_name] - InputMap.action_add_event(action_name, profile[action_name]) + for profile_name in profiles.values(): + var profile = get(profile_name) + for action_name in profile.keys(): + if(action_name.ends_with("_old")): + continue + erase_old_action_event(action_name) + profile[action_name + "_old"] = profile[action_name] + InputMap.action_add_event(action_name, profile[action_name]) func change_action_key(action_name, event, old_event = null) -> bool: - if(old_event != null): - if(event.as_text().match("*Joy*") != old_event.as_text().match("*Joy*")): - return false - get_selected_profile()[action_name+"_old"] = old_event - get_selected_profile()[action_name] = event - return true + if(old_event != null): + if(event.as_text().match("*Joy*") != old_event.as_text().match("*Joy*")): + return false + get_selected_profile()[action_name+"_old"] = old_event + get_selected_profile()[action_name] = event + return true func erase_old_action_event(action_name): - if(get_selected_profile().has(action_name+"_old")): - var old_event = get_selected_profile()[action_name+"_old"] - var event = get_selected_profile()[action_name] - if(old_event != event): - InputMap.action_erase_event(action_name, old_event) + if(get_selected_profile().has(action_name+"_old")): + var old_event = get_selected_profile()[action_name+"_old"] + var event = get_selected_profile()[action_name] + if(old_event != event): + InputMap.action_erase_event(action_name, old_event) func initialize_profiles() -> void: - var actions: Array = InputMap.get_actions() - actions.sort() - for action in actions: - var input_events = InputMap.get_action_list(action) - for event in input_events: - if event.as_text().match("*JoypadButton*"): - controller[action] = event - controller[action+"_old"] = event - elif !event.as_text().match("*Joy*"): - keyboard[action] = event - keyboard[action+"_old"] = event - change_profile(current_profile_id) + var actions: Array = InputMap.get_actions() + actions.sort() + for action in actions: + var input_events = InputMap.get_action_list(action) + for event in input_events: + if event.as_text().match("*JoypadButton*"): + controller[action] = event + controller[action+"_old"] = event + elif !event.as_text().match("*Joy*"): + keyboard[action] = event + keyboard[action+"_old"] = event + change_profile(current_profile_id) func get_selected_profile(): - return get(profiles[current_profile_id]) + return get(profiles[current_profile_id]) func _on_ProfilesMenu_item_selected(ID): - change_profile(ID) + change_profile(ID) diff --git a/src/UserInterface/Screens/MainMenu/MainScreen.gd b/src/UserInterface/Screens/MainMenu/MainScreen.gd new file mode 100644 index 0000000..7b283be --- /dev/null +++ b/src/UserInterface/Screens/MainMenu/MainScreen.gd @@ -0,0 +1,5 @@ +extends Control + + +func _ready() -> void: + $"%PlayButton".grab_focus() diff --git a/src/UserInterface/Screens/MainMenu/MainScreen.tscn b/src/UserInterface/Screens/MainMenu/MainScreen.tscn index 0722b34..9c5f270 100644 --- a/src/UserInterface/Screens/MainMenu/MainScreen.tscn +++ b/src/UserInterface/Screens/MainMenu/MainScreen.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://src/UserInterface/Buttons/QuitButton.tscn" type="PackedScene" id=1] [ext_resource path="res://src/UserInterface/Titel.tscn" type="PackedScene" id=2] @@ -7,11 +7,39 @@ [ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=5] [ext_resource path="res://assets/environment/background/Spaceship-Wall.png" type="Texture" id=6] [ext_resource path="res://assets/environment/background/starry-space.png" type="Texture" id=7] +[ext_resource path="res://assets/sounds/Simple Switch On.ogg" type="AudioStream" id=8] [ext_resource path="res://src/UserInterface/Screens/MainMenu/LevelSelectButtonGroup.tres" type="ButtonGroup" id=9] [ext_resource path="res://assets/meta/montserrat_extrabold.otf" type="DynamicFontData" id=10] [ext_resource path="res://src/UserInterface/Screens/MainMenu/LevelList.gd" type="Script" id=11] [ext_resource path="res://src/UserInterface/Buttons/MenuNavigationButton.gd" type="Script" id=12] [ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi-theme.tres" type="Theme" id=13] +[ext_resource path="res://src/UserInterface/Screens/MainMenu/MainScreen.gd" type="Script" id=14] + +[sub_resource type="Gradient" id=4] +interpolation_mode = 2 +offsets = PoolRealArray( 0, 0.797721 ) +colors = PoolColorArray( 0, 0, 0, 0, 0, 0, 0, 0.513726 ) + +[sub_resource type="GradientTexture2D" id=5] +gradient = SubResource( 4 ) +width = 640 +height = 360 +fill = 1 +fill_from = Vector2( 0.497242, 0.46915 ) +fill_to = Vector2( 1, 1 ) + +[sub_resource type="Gradient" id=2] +interpolation_mode = 2 +offsets = PoolRealArray( 0, 0.797721 ) +colors = PoolColorArray( 0, 0, 0, 0, 0, 0, 0, 0.513726 ) + +[sub_resource type="GradientTexture2D" id=3] +gradient = SubResource( 2 ) +width = 1280 +height = 360 +fill = 1 +fill_from = Vector2( 0.514029, 0.849867 ) +fill_to = Vector2( 1, 0.994443 ) [sub_resource type="DynamicFont" id=1] size = 60 @@ -24,6 +52,7 @@ mouse_filter = 2 size_flags_horizontal = 0 size_flags_vertical = 0 theme = ExtResource( 5 ) +script = ExtResource( 14 ) [node name="SignalManager" parent="." instance=ExtResource( 4 )] @@ -43,6 +72,38 @@ texture = ExtResource( 6 ) expand = true stretch_mode = 1 +[node name="TextureRect" type="TextureRect" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -583.0 +margin_top = -35.0 +margin_right = 567.0 +margin_bottom = 291.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = SubResource( 5 ) +expand = true +stretch_mode = 1 + +[node name="TextureRect2" type="TextureRect" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -583.0 +margin_top = -412.0 +margin_right = 567.0 +margin_bottom = -86.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +texture = SubResource( 3 ) +expand = true +stretch_mode = 1 + [node name="MarginContainer" type="MarginContainer" parent="."] anchor_left = 0.5 anchor_top = 0.02 @@ -93,7 +154,7 @@ size_flags_horizontal = 3 [node name="PlayButton" parent="MenuContainer/Buttons" instance=ExtResource( 3 )] unique_name_in_owner = true margin_right = 154.0 -margin_bottom = 42.0 +margin_bottom = 30.0 focus_neighbour_top = NodePath("../QuitButton") focus_neighbour_bottom = NodePath("../Controlls") theme = ExtResource( 13 ) @@ -101,25 +162,37 @@ next_scene_path = "res://src/Levels/1 Tutorial Level.tscn" [node name="Controlls" parent="MenuContainer/Buttons" instance=ExtResource( 3 )] unique_name_in_owner = true -margin_top = 46.0 +margin_top = 34.0 margin_right = 154.0 -margin_bottom = 88.0 +margin_bottom = 65.0 focus_neighbour_top = NodePath("../PlayButton") -focus_neighbour_bottom = NodePath("../QuitButton") +focus_neighbour_bottom = NodePath("../Audio") theme = ExtResource( 13 ) text = "Controls" script = ExtResource( 12 ) next_screen_path = "res://src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.tscn" +[node name="Audio" parent="MenuContainer/Buttons" instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 69.0 +margin_right = 154.0 +margin_bottom = 100.0 +focus_neighbour_top = NodePath("../Controlls") +focus_neighbour_bottom = NodePath("../QuitButton") +theme = ExtResource( 13 ) +text = "Audio" +script = ExtResource( 12 ) +next_screen_path = "res://src/UserInterface/Screens/MainMenu/AudioMenu.tscn" + [node name="QuitButton" parent="MenuContainer/Buttons" instance=ExtResource( 1 )] unique_name_in_owner = true anchor_left = 0.0 anchor_right = 0.0 margin_left = 0.0 -margin_top = 92.0 +margin_top = 104.0 margin_right = 154.0 margin_bottom = 135.0 -focus_neighbour_top = NodePath("../Controlls") +focus_neighbour_top = NodePath("../Audio") focus_neighbour_bottom = NodePath("../PlayButton") [node name="Panel" type="Panel" parent="MenuContainer"] @@ -171,4 +244,7 @@ size_flags_horizontal = 3 size_flags_vertical = 3 group = ExtResource( 9 ) -[connection signal="focus_entered" from="MenuContainer/Buttons/PlayButton" to="MenuContainer/Buttons/PlayButton" method="_on_PlayButton_focus_entered"] +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 8 ) +volume_db = 9.546 +bus = "UI"