1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 01:03:02 +08:00
osu-lazer/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs

50 lines
1.7 KiB
C#
Raw Normal View History

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