2022-03-01 13:13:27 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2022-03-01 13:13:27 +08:00
|
|
|
using osu.Framework.Allocation;
|
2022-03-01 15:14:57 +08:00
|
|
|
using osu.Framework.Bindables;
|
2022-03-01 13:13:27 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Configuration;
|
2022-01-28 12:53:48 +08:00
|
|
|
using osu.Game.Localisation;
|
2022-03-01 15:14:57 +08:00
|
|
|
using osu.Game.Scoring;
|
2022-03-01 13:13:27 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Play.PlayerSettings
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class AudioSettings : PlayerSettingsGroup
|
2022-03-01 13:13:27 +08:00
|
|
|
{
|
2022-03-01 15:14:57 +08:00
|
|
|
public Bindable<ScoreInfo> ReferenceScore { get; } = new Bindable<ScoreInfo>();
|
|
|
|
|
2022-03-01 13:13:27 +08:00
|
|
|
private readonly PlayerCheckbox beatmapHitsoundsToggle;
|
|
|
|
|
|
|
|
public AudioSettings()
|
|
|
|
: base("Audio Settings")
|
|
|
|
{
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
2022-01-28 12:53:48 +08:00
|
|
|
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = SkinSettingsStrings.BeatmapHitsounds },
|
2022-03-01 15:14:57 +08:00
|
|
|
new BeatmapOffsetControl
|
|
|
|
{
|
|
|
|
ReferenceScore = { BindTarget = ReferenceScore },
|
|
|
|
},
|
2022-03-01 13:13:27 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuConfigManager config)
|
|
|
|
{
|
|
|
|
beatmapHitsoundsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|