ajout de panneaux de contrôles, de paramètres et refactorisation de la gestion de l'audio

This commit is contained in:
2025-11-22 15:10:41 +01:00
parent dbe8f03531
commit 435415363c
171 changed files with 2165 additions and 922 deletions

View File

@@ -1,11 +1,9 @@
[gd_scene load_steps=13 format=3 uid="uid://fnv0qhkh40mv"]
[gd_scene load_steps=11 format=3 uid="uid://fnv0qhkh40mv"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_0ssee"]
[ext_resource type="Script" uid="uid://bvb4v66bqteuc" path="res://gui/game/announce/scripts/announce.gd" id="1_4evne"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_yrhd4"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_7nrno"]
[ext_resource type="AudioStream" uid="uid://ccq04ahrwr3bv" path="res://gui/game/announce/assets/sfx/alarm.wav" id="5_iwcrn"]
[ext_resource type="AudioStream" uid="uid://d1cpi438ep0ys" path="res://gui/game/announce/assets/sfx/quota_announcement.wav" id="6_oh30d"]
[sub_resource type="LabelSettings" id="LabelSettings_vbart"]
font = ExtResource("2_yrhd4")
@@ -162,13 +160,3 @@ unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_dvva5")
}
[node name="Alarm" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("5_iwcrn")
volume_db = -7.668
[node name="Announce" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("6_oh30d")
volume_db = -7.668

View File

@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ccq04ahrwr3bv"
path="res://.godot/imported/alarm.wav-e0f6b7b4874e69f8a83b072a97c636f4.sample"
[deps]
source_file="res://gui/game/announce/assets/sfx/alarm.wav"
dest_files=["res://.godot/imported/alarm.wav-e0f6b7b4874e69f8a83b072a97c636f4.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View File

@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d1cpi438ep0ys"
path="res://.godot/imported/quota_announcement.wav-ebdd79fb160b0596cac5cfcd6835a186.sample"
[deps]
source_file="res://gui/game/announce/assets/sfx/quota_announcement.wav"
dest_files=["res://.godot/imported/quota_announcement.wav-ebdd79fb160b0596cac5cfcd6835a186.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View File

@@ -9,4 +9,4 @@ func announce(title : String, text : String, band_color : Color = YELLOW_COLOR):
%AnnounceText.text = text
%AnnounceTexture.modulate = band_color
%AnimationPlayer.play("pass")
%Announce.play()
AudioManager.play_sfx("Announce")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://753270jjxmfg"]
[gd_scene load_steps=19 format=3 uid="uid://753270jjxmfg"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_m317d"]
[ext_resource type="Script" uid="uid://b7f10wuounfan" path="res://gui/game/card/scripts/card.gd" id="2_kpm7h"]
@@ -19,37 +19,6 @@ corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[sub_resource type="Resource" id="Resource_mwhj8"]
script = ExtResource("5_7wc8v")
title_text = "Title"
title_icon = ExtResource("6_7wc8v")
text = "Text"
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_kpm7h"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_7wc8v"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_pmldi"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_gibok"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_vnqhg"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_on5kv"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_plgbn"]
script = ExtResource("3_7wc8v")
title = "Hello"
@@ -57,7 +26,6 @@ type_icon = ExtResource("6_7wc8v")
texture = ExtResource("7_mwhj8")
important_stat_text = "10"
important_stat_icon = ExtResource("3_kpm7h")
sections = Array[ExtResource("5_7wc8v")]([SubResource("Resource_mwhj8"), SubResource("Resource_kpm7h"), SubResource("Resource_7wc8v"), SubResource("Resource_pmldi"), SubResource("Resource_gibok"), SubResource("Resource_vnqhg"), SubResource("Resource_on5kv"), null])
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnqhg"]
@@ -83,8 +51,8 @@ _data = {
[node name="Card" type="PanelContainer"]
custom_minimum_size = Vector2(250, 0)
offset_right = 140.0
offset_bottom = 60.0
offset_right = 250.0
offset_bottom = 377.0
size_flags_horizontal = 0
size_flags_vertical = 0
theme = ExtResource("1_m317d")

View File

@@ -1,13 +1,16 @@
[gd_scene load_steps=14 format=3 uid="uid://csiacsndm62ll"]
[gd_scene load_steps=17 format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_8d1kg"]
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://gui/game/pause/resources/blur.gdshader" id="2_apjlw"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_0pdto"]
[ext_resource type="PackedScene" uid="uid://g6lbgg1fhc25" path="res://gui/menu/settings/settings.tscn" id="4_58dya"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_apjlw"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://common/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://common/icons/rotate.svg" id="6_58dya"]
[ext_resource type="Texture2D" uid="uid://cixd5j8yqpavg" path="res://common/icons/settings.svg" id="6_yj6f1"]
[ext_resource type="Texture2D" uid="uid://bkwhrq4sp5dcp" path="res://common/icons/device-gamepad.svg" id="7_7c7ks"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="7_yj6f1"]
[ext_resource type="PackedScene" uid="uid://b4qe1dwwsk87t" path="res://gui/menu/controls/controls.tscn" id="11_urlqn"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58dya"]
shader = ExtResource("2_apjlw")
@@ -15,8 +18,8 @@ shader_parameter/strength = 3.3
shader_parameter/mix_percentage = 0.3
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("2_8d1kg")
font_size = 50
font = ExtResource("4_apjlw")
font_size = 30
[sub_resource type="Animation" id="Animation_58dya"]
length = 0.001
@@ -103,7 +106,7 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="Container"]
[node name="MarginContainer" type="MarginContainer" parent="Container"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -112,54 +115,69 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
[node name="VBoxContainer" type="VBoxContainer" parent="Container/Tutorial"]
[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer"]
layout_mode = 2
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 9
theme_override_constants/separation = 20
alignment = 1
[node name="PauseTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
[node name="PauseTitle" type="Label" parent="Container/MarginContainer/Pause"]
layout_mode = 2
text = "PAUSE"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "CONTROLS"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "CONTROLS_TEXT"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Container/Tutorial/VBoxContainer"]
[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/Pause"]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
[node name="Resume" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Resume" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
theme = ExtResource("1_51ks3")
text = "RESUME_GAME"
icon = ExtResource("5_apjlw")
[node name="Restart" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Settings" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "SETTINGS"
icon = ExtResource("6_yj6f1")
[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "CONTROLS"
icon = ExtResource("7_7c7ks")
[node name="Restart" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "RESTART"
icon = ExtResource("6_58dya")
[node name="Quit" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "QUIT"
icon = ExtResource("7_yj6f1")
[node name="Settings" parent="." instance=ExtResource("4_58dya")]
unique_name_in_owner = true
visible = false
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 2
[node name="Controls" parent="." instance=ExtResource("11_urlqn")]
unique_name_in_owner = true
visible = false
mouse_filter = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_yj6f1")
}
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Settings" to="." method="_on_settings_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Controls" to="." method="_on_controls_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

View File

@@ -12,7 +12,8 @@ func set_pause(p):
%AnimationPlayer.play_backwards("pause")
pause = p
get_tree().paused = pause
%Settings.close_settings()
%Controls.close_controls()
func _input(_event):
if Input.is_action_just_pressed("pause"):
@@ -31,3 +32,9 @@ func _on_quit_pressed():
func _on_game_gui_pause_asked():
pause = true
func _on_settings_pressed():
%Settings.open_settings()
func _on_controls_pressed():
%Controls.open_controls()