mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Reorganise class
This commit is contained in:
parent
5ba8388e54
commit
cc41618760
@ -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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -26,6 +26,20 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
|
|
||||||
protected virtual UserDimContainer CreateFadeContainer() => new UserDimContainer { RelativeSizeAxes = Axes.Both };
|
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
|
public virtual WorkingBeatmap Beatmap
|
||||||
{
|
{
|
||||||
get => beatmap;
|
get => beatmap;
|
||||||
@ -60,20 +74,6 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
StoryboardReplacesBackground.BindTo(fadeContainer.StoryboardReplacesBackground);
|
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)
|
public override bool Equals(BackgroundScreen other)
|
||||||
{
|
{
|
||||||
var otherBeatmapBackground = other as BackgroundScreenBeatmap;
|
var otherBeatmapBackground = other as BackgroundScreenBeatmap;
|
||||||
|
Loading…
Reference in New Issue
Block a user