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