mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Initial implementation of adjustable positional hitobject audio strength
This commit is contained in:
@ -2,10 +2,13 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
@ -13,9 +16,15 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
protected override LocalisableString Header => GameplaySettingsStrings.AudioHeader;
|
||||
|
||||
private Bindable<float> positionalHitsoundsLevel;
|
||||
|
||||
private FillFlowContainer<SettingsSlider<float>> positionalHitsoundsSettings;
|
||||
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
private void load(OsuConfigManager config,OsuConfigManager osuConfig)
|
||||
{
|
||||
positionalHitsoundsLevel = osuConfig.GetBindable<float>(OsuSetting.PositionalHitsoundsLevel);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsCheckbox
|
||||
@ -23,6 +32,23 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
LabelText = GameplaySettingsStrings.PositionalHitsounds,
|
||||
Current = config.GetBindable<bool>(OsuSetting.PositionalHitSounds)
|
||||
},
|
||||
positionalHitsoundsSettings = new FillFlowContainer<SettingsSlider<float>>
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new SettingsSlider<float>
|
||||
{
|
||||
LabelText = AudioSettingsStrings.PositionalLevel,
|
||||
Current = positionalHitsoundsLevel,
|
||||
KeyboardStep = 0.01f,
|
||||
DisplayAsPercentage = true,
|
||||
},
|
||||
}
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = GameplaySettingsStrings.AlwaysPlayFirstComboBreak,
|
||||
|
Reference in New Issue
Block a user