Add setting to turn on/off the video

This commit is contained in:
Andrei Zavatski
2019-08-31 00:42:20 +03:00
parent 5dd688a51b
commit fa3591e5ec
6 changed files with 18 additions and 4 deletions

View File

@ -35,6 +35,8 @@ namespace osu.Game.Graphics.Containers
protected Bindable<bool> ShowStoryboard { get; private set; }
protected Bindable<bool> ShowVideo { get; private set; }
protected double DimLevel => EnableUserDim.Value ? UserDimLevel.Value : 0;
protected override Container<Drawable> Content => dimContent;
@ -54,10 +56,12 @@ namespace osu.Game.Graphics.Containers
{
UserDimLevel = config.GetBindable<double>(OsuSetting.DimLevel);
ShowStoryboard = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
ShowVideo = config.GetBindable<bool>(OsuSetting.ShowVideo);
EnableUserDim.ValueChanged += _ => UpdateVisuals();
UserDimLevel.ValueChanged += _ => UpdateVisuals();
ShowStoryboard.ValueChanged += _ => UpdateVisuals();
ShowVideo.ValueChanged += _ => UpdateVisuals();
StoryboardReplacesBackground.ValueChanged += _ => UpdateVisuals();
}