// Copyright (c) ppy Pty Ltd . 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; using osu.Game.Localisation; namespace osu.Game.Screens.Play.PlayerSettings { public class VisualSettings : PlayerSettingsGroup { private readonly PlayerSliderBar dimSliderBar; private readonly PlayerSliderBar blurSliderBar; private readonly PlayerSliderBar comboColourNormalisationSliderBar; private readonly PlayerCheckbox showStoryboardToggle; private readonly PlayerCheckbox beatmapSkinsToggle; private readonly PlayerCheckbox beatmapColorsToggle; public VisualSettings() : base("Visual Settings") { Children = new Drawable[] { dimSliderBar = new PlayerSliderBar { LabelText = GameplaySettingsStrings.BackgroundDim, DisplayAsPercentage = true }, blurSliderBar = new PlayerSliderBar { LabelText = GameplaySettingsStrings.BackgroundBlur, DisplayAsPercentage = true }, showStoryboardToggle = new PlayerCheckbox { LabelText = GraphicsSettingsStrings.StoryboardVideo }, beatmapSkinsToggle = new PlayerCheckbox { LabelText = SkinSettingsStrings.BeatmapSkins }, beatmapColorsToggle = new PlayerCheckbox { LabelText = SkinSettingsStrings.BeatmapColours }, comboColourNormalisationSliderBar = new PlayerSliderBar { LabelText = GraphicsSettingsStrings.ComboColourNormalisation, DisplayAsPercentage = true, }, }; } [BackgroundDependencyLoader] private void load(OsuConfigManager config) { dimSliderBar.Current = config.GetBindable(OsuSetting.DimLevel); blurSliderBar.Current = config.GetBindable(OsuSetting.BlurLevel); showStoryboardToggle.Current = config.GetBindable(OsuSetting.ShowStoryboard); beatmapSkinsToggle.Current = config.GetBindable(OsuSetting.BeatmapSkins); beatmapColorsToggle.Current = config.GetBindable(OsuSetting.BeatmapColours); comboColourNormalisationSliderBar.Current = config.GetBindable(OsuSetting.ComboColourNormalisationAmount); } } }