Reorganise class

This commit is contained in:
Dean Herbert 2019-03-12 12:56:01 +09:00
parent 5ba8388e54
commit cc41618760
1 changed files with 15 additions and 15 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
@ -26,6 +26,20 @@ public class BackgroundScreenBeatmap : BlurrableBackgroundScreen
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };
public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null)
{
Beatmap = beatmap;
InternalChild = fadeContainer = CreateFadeContainer();
fadeContainer.EnableUserDim.BindTo(EnableUserDim);
}
[BackgroundDependencyLoader]
private void load()
{
if (beatmap != null)
backgroundLoaded(new BeatmapBackground(beatmap));
}
public virtual WorkingBeatmap Beatmap
{
get => beatmap;
@ -60,20 +74,6 @@ private void backgroundLoaded(BeatmapBackground b)
StoryboardReplacesBackground.BindTo(fadeContainer.StoryboardReplacesBackground);
}
[BackgroundDependencyLoader]
private void load()
{
if (beatmap != null)
backgroundLoaded(new BeatmapBackground(beatmap));
}
public BackgroundScreenBeatmap(WorkingBeatmap beatmap = null)
{
Beatmap = beatmap;
InternalChild = fadeContainer = CreateFadeContainer();
fadeContainer.EnableUserDim.BindTo(EnableUserDim);
}
public override bool Equals(BackgroundScreen other)
{
var otherBeatmapBackground = other as BackgroundScreenBeatmap;