1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Move player loader audio settings to new group

This commit is contained in:
Dean Herbert 2022-03-01 14:13:27 +09:00
parent 9a117467b5
commit 4117a6adf7
3 changed files with 30 additions and 3 deletions

View File

@ -167,6 +167,7 @@ namespace osu.Game.Screens.Play
Children = new PlayerSettingsGroup[]
{
VisualSettings = new VisualSettings(),
new AudioSettings(),
new InputSettings()
}
},

View File

@ -0,0 +1,29 @@
// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
namespace osu.Game.Screens.Play.PlayerSettings
{
public class AudioSettings : PlayerSettingsGroup
{
private readonly PlayerCheckbox beatmapHitsoundsToggle;
public AudioSettings()
: base("Audio Settings")
{
Children = new Drawable[]
{
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
};
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
beatmapHitsoundsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
}
}
}

View File

@ -15,7 +15,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
private readonly PlayerCheckbox showStoryboardToggle;
private readonly PlayerCheckbox beatmapSkinsToggle;
private readonly PlayerCheckbox beatmapColorsToggle;
private readonly PlayerCheckbox beatmapHitsoundsToggle;
public VisualSettings()
: base("Visual Settings")
@ -45,7 +44,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboard / Video" },
beatmapSkinsToggle = new PlayerCheckbox { LabelText = "Beatmap skins" },
beatmapColorsToggle = new PlayerCheckbox { LabelText = "Beatmap colours" },
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
};
}
@ -57,7 +55,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
beatmapColorsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapColours);
beatmapHitsoundsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
}
}
}