diff --git a/src/logic-scenes/startup/startup.tscn b/src/logic-scenes/startup/startup.tscn index b6b7300..f6048de 100644 --- a/src/logic-scenes/startup/startup.tscn +++ b/src/logic-scenes/startup/startup.tscn @@ -62,7 +62,33 @@ func _on_subtitle_option_selected(index): 2: State.enable_subtitles = true State.enable_closed_caption = true + print_debug(State.print_settings()) + + +func _on_mute_soundtrack_toggled(button_pressed): + AudioServer.set_bus_mute(AudioServer.get_bus_index(\"music\"),button_pressed) + + +func _on_mute_sfx_toggled(button_pressed): + AudioServer.set_bus_mute(AudioServer.get_bus_index(\"sfx\"),button_pressed) + + +func _on_music_volume_changed(value): + AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"music\"), linear_to_db(value)) + + +func _on_sfx_volume_changed(value): + AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"sfx\"), linear_to_db(value)) + + +func _on_text_volume_changed(value): + AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"text\"), linear_to_db(value)) + + +func _on_master_volume_changed(value): + AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Master\"), linear_to_db(value)) + " [sub_resource type="GDScript" id="GDScript_ia432"] @@ -343,9 +369,9 @@ text = "Music" layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 4 -max_value = 2.0 +max_value = 1.0 step = 0.05 -value = 1.0 +value = 0.5 ticks_on_borders = true script = ExtResource("3_q2gbh") @@ -357,9 +383,9 @@ text = "Sounds" layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 4 -max_value = 2.0 +max_value = 1.0 step = 0.05 -value = 1.0 +value = 0.5 [node name="Label4" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"] layout_mode = 2 @@ -370,9 +396,22 @@ text = "Speech layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 4 -max_value = 2.0 +max_value = 1.0 step = 0.05 -value = 1.0 +value = 0.5 + +[node name="Label5" type="Label" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"] +layout_mode = 2 +text = "Sum +" + +[node name="Sum" type="HSlider" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +max_value = 1.0 +step = 0.05 +value = 0.5 [node name="Audio Sliders" type="HBoxContainer" parent="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer"] layout_mode = 2 @@ -614,6 +653,12 @@ text = "I stream this game, please show content notes." [connection signal="item_selected" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/Container2/GridContainer/ItemList2" to="." method="_on_subtitle_option_selected"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/physical Accessibility/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] +[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/CheckBox" to="." method="_on_mute_soundtrack_toggled"] +[connection signal="toggled" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/CheckBox2" to="." method="_on_mute_sfx_toggled"] +[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Music" to="." method="_on_music_volume_changed"] +[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Sounds" to="." method="_on_sfx_volume_changed"] +[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Speech" to="." method="_on_text_volume_changed"] +[connection signal="value_changed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/VBoxContainer/GridContainer/Sum" to="." method="_on_master_volume_changed"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/Next" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="next"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Audio Settings/navbuttons/previous" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer" method="previous"] [connection signal="pressed" from="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/show content Notes" to="CenterContainer/PanelContainer/VBoxContainer/TabContainer/Content Notes/ScrollContainer/Content Notes" method="show"]