mirror of
https://github.com/ppy/osu
synced 2025-02-25 15:11:46 +00:00
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>
|
/// </summary>
|
||||||
public class UserDimContainer : Container
|
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>
|
/// <summary>
|
||||||
/// Whether or not user-configured dim levels should be applied to the container.
|
/// Whether or not user-configured dim levels should be applied to the container.
|
||||||
@ -28,9 +28,9 @@ namespace osu.Game.Graphics.Containers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not the storyboard loaded should completely hide the background behind it.
|
/// Whether or not the storyboard loaded should completely hide the background behind it.
|
||||||
/// </summary>
|
/// </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;
|
protected override Container<Drawable> Content => DimContainer;
|
||||||
|
|
||||||
@ -39,6 +39,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
private const float background_fade_duration = 800;
|
private const float background_fade_duration = 800;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// Creates a new <see cref="UserDimContainer" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="isStoryboard">
|
/// <param name="isStoryboard">
|
||||||
/// Whether or not this instance of UserDimContainer contains a storyboard.
|
/// Whether or not this instance of UserDimContainer contains a storyboard.
|
||||||
|
@ -18,11 +18,11 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not user dim settings should be applied to this Background.
|
/// Whether or not user dim settings should be applied to this Background.
|
||||||
/// </summary>
|
/// </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 };
|
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private FailOverlay failOverlay;
|
private FailOverlay failOverlay;
|
||||||
|
|
||||||
private DrawableStoryboard storyboard;
|
private DrawableStoryboard storyboard;
|
||||||
protected UserDimContainer StoryboardContainer;
|
protected UserDimContainer StoryboardContainer { get; private set; }
|
||||||
|
|
||||||
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
protected virtual UserDimContainer CreateStoryboardContainer() => new UserDimContainer(true)
|
||||||
{
|
{
|
||||||
@ -358,7 +358,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Background.EnableUserDim.Value = true;
|
Background.EnableUserDim.Value = true;
|
||||||
|
|
||||||
storyboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
storyboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
||||||
StoryboardContainer.StoryboardReplacesBackground.BindTo(Background.StoryboardReplacesBackground);
|
StoryboardContainer.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||||
storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;
|
storyboardReplacesBackground.Value = Beatmap.Value.Storyboard.ReplacesBackground && Beatmap.Value.Storyboard.HasDrawable;
|
||||||
|
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user