1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:47:24 +08:00
osu-lazer/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
2.6 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2018-01-10 07:24:51 +08:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Localisation;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Screens.Play.PlayerSettings
2018-01-10 07:24:51 +08:00
{
2018-01-16 01:52:52 +08:00
public partial class VisualSettings : PlayerSettingsGroup
2018-01-10 07:24:51 +08:00
{
private readonly PlayerSliderBar<double> dimSliderBar;
private readonly PlayerSliderBar<double> blurSliderBar;
2022-11-02 12:48:03 +08:00
private readonly PlayerSliderBar<float> comboColourNormalisationSliderBar;
private readonly PlayerCheckbox showStoryboardToggle;
2018-04-25 15:15:23 +08:00
private readonly PlayerCheckbox beatmapSkinsToggle;
private readonly PlayerCheckbox beatmapColorsToggle;
2018-04-13 17:19:50 +08:00
2018-01-10 07:24:51 +08:00
public VisualSettings()
: base("Visual Settings")
2018-01-10 07:24:51 +08:00
{
Children = new Drawable[]
{
dimSliderBar = new PlayerSliderBar<double>
{
LabelText = GameplaySettingsStrings.BackgroundDim,
DisplayAsPercentage = true
},
blurSliderBar = new PlayerSliderBar<double>
{
LabelText = GameplaySettingsStrings.BackgroundBlur,
DisplayAsPercentage = true
},
showStoryboardToggle = new PlayerCheckbox { LabelText = GraphicsSettingsStrings.StoryboardVideo },
beatmapSkinsToggle = new PlayerCheckbox { LabelText = SkinSettingsStrings.BeatmapSkins },
beatmapColorsToggle = new PlayerCheckbox { LabelText = SkinSettingsStrings.BeatmapColours },
2022-11-02 12:48:03 +08:00
comboColourNormalisationSliderBar = new PlayerSliderBar<float>
{
2022-11-02 13:01:03 +08:00
LabelText = GraphicsSettingsStrings.ComboColourNormalisation,
2022-11-02 12:48:03 +08:00
DisplayAsPercentage = true,
},
2018-01-10 07:24:51 +08:00
};
}
2018-04-13 17:19:50 +08:00
2018-01-10 07:24:51 +08:00
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
dimSliderBar.Current = config.GetBindable<double>(OsuSetting.DimLevel);
blurSliderBar.Current = config.GetBindable<double>(OsuSetting.BlurLevel);
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
beatmapColorsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapColours);
comboColourNormalisationSliderBar.Current = config.GetBindable<float>(OsuSetting.ComboColourNormalisationAmount);
2018-01-12 04:39:23 +08:00
}
2018-01-10 07:24:51 +08:00
}
}