mirror of https://github.com/ppy/osu
Apply suggestions from code review
Co-Authored-By: nyquillerium <nyquill@ppy.sh>
This commit is contained in:
parent
b2872b47d0
commit
99812bd448
|
@ -16,9 +16,9 @@ namespace osu.Game.Graphics.Containers
|
|||
/// </summary>
|
||||
public class UserDimContainer : Container
|
||||
{
|
||||
protected Bindable<double> DimLevel;
|
||||
protected Bindable<double> DimLevel { get; private set; }
|
||||
|
||||
protected Bindable<bool> ShowStoryboard;
|
||||
protected Bindable<bool> ShowStoryboard { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not user-configured dim levels should be applied to the container.
|
||||
|
@ -28,9 +28,9 @@ public class UserDimContainer : Container
|
|||
/// <summary>
|
||||
/// Whether or not the storyboard loaded should completely hide the background behind it.
|
||||
/// </summary>
|
||||
public Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
||||
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
||||
|
||||
protected Container DimContainer;
|
||||
protected Container DimContainer { get; private set; }
|
||||
|
||||
protected override Container<Drawable> Content => DimContainer;
|
||||
|
||||
|
@ -39,6 +39,7 @@ public class UserDimContainer : Container
|
|||
private const float background_fade_duration = 800;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="UserDimContainer" />.
|
||||
/// </summary>
|
||||
/// <param name="isStoryboard">
|
||||
/// Whether or not this instance of UserDimContainer contains a storyboard.
|
||||
|
|
|
@ -18,11 +18,11 @@ public class BackgroundScreenBeatmap : BlurrableBackgroundScreen
|
|||
/// <summary>
|
||||
/// Whether or not user dim settings should be applied to this Background.
|
||||
/// </summary>
|
||||
public Bindable<bool> EnableUserDim = new Bindable<bool>();
|
||||
public readonly Bindable<bool> EnableUserDim = new Bindable<bool>();
|
||||
|
||||
public Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
||||
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
||||
|
||||
protected UserDimContainer FadeContainer;
|
||||
protected UserDimContainer FadeContainer { get; private set; }
|
||||
|
||||
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public class Player : ScreenWithBeatmapBackground, IProvideCursor
|
|||
private FailOverlay failOverlay;
|
||||
|
||||
private DrawableStoryboard storyboard;
|
||||
protected UserDimContainer StoryboardContainer;
|
||||
protected UserDimContainer StoryboardContainer { get; private set; }
|
||||
|
||||
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
||||
{
|
||||
|
@ -358,7 +358,7 @@ public override void OnEntering(IScreen last)
|
|||
Background.EnableUserDim.Value = true;
|
||||
|
||||
storyboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
||||
StoryboardContainer.StoryboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
||||
StoryboardContainer.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||
storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;
|
||||
|
||||
Task.Run(() =>
|
||||
|
|
Loading…
Reference in New Issue