1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 22:07:26 +08:00
osu-lazer/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs

50 lines
1.7 KiB
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Screens.Play.PlayerSettings
{
public class VisualSettings : PlayerSettingsGroup
{
protected override string Title => "Visual settings";
private readonly PlayerSliderBar<double> dimSliderBar;
private readonly PlayerSliderBar<double> blurSliderBar;
private readonly PlayerCheckbox showStoryboardToggle;
public VisualSettings()
{
Children = new Drawable[]
{
new OsuSpriteText
{
Text = "Background dim:"
},
dimSliderBar = new PlayerSliderBar<double>(),
new OsuSpriteText
{
Text = "Background blur:"
},
blurSliderBar = new PlayerSliderBar<double>(),
new OsuSpriteText
{
Text = "Toggles:"
},
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboards" }
};
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
dimSliderBar.Bindable = config.GetBindable<double>(OsuSetting.DimLevel);
blurSliderBar.Bindable = config.GetBindable<double>(OsuSetting.BlurLevel);
showStoryboardToggle.Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
}
}
}