mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
Removed unnecessary class for wrapping
This commit is contained in:
parent
bb385f4255
commit
b6b9a69601
@ -7,6 +7,7 @@ using JetBrains.Annotations;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -135,7 +136,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
private void selectBeatmap([CanBeNull] IBeatmap b)
|
||||
{
|
||||
BeatmapInfoWedge.BeatmapInfoWedgeContainer containerBefore = null;
|
||||
Container containerBefore = null;
|
||||
|
||||
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
|
||||
{
|
||||
@ -193,9 +194,9 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
|
||||
private class TestBeatmapInfoWedge : BeatmapInfoWedge
|
||||
{
|
||||
public new BeatmapInfoWedgeContainer Container => base.Container;
|
||||
public new Container Container => base.Container;
|
||||
|
||||
public WedgeInfoText Info => base.Container.Info;
|
||||
public new WedgeInfoText Info => base.Info;
|
||||
}
|
||||
|
||||
private class TestHitObject : ConvertHitObject, IHasPosition
|
||||
|
@ -48,7 +48,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private IBindable<StarDifficulty?> beatmapDifficulty;
|
||||
|
||||
protected BeatmapInfoWedgeContainer Container;
|
||||
protected Container Container;
|
||||
protected WedgeInfoText Info;
|
||||
|
||||
public BeatmapInfoWedge()
|
||||
{
|
||||
@ -111,7 +112,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public override bool IsPresent => base.IsPresent || Container == null; // Visibility is updated in the LoadComponentAsync callback
|
||||
|
||||
private BeatmapInfoWedgeContainer loadingInfo;
|
||||
private Container loadingInfo;
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
@ -134,10 +135,16 @@ namespace osu.Game.Screens.Select
|
||||
return;
|
||||
}
|
||||
|
||||
LoadComponentAsync(loadingInfo = new BeatmapInfoWedgeContainer(beatmap, ruleset.Value, mods.Value, beatmapDifficulty.Value ?? new StarDifficulty())
|
||||
LoadComponentAsync(loadingInfo = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Shear = -Shear,
|
||||
Depth = Container?.Depth + 1 ?? 0,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BeatmapInfoWedgeBackground(beatmap),
|
||||
Info = new WedgeInfoText(beatmap, ruleset.Value, mods.Value, beatmapDifficulty.Value ?? new StarDifficulty()),
|
||||
}
|
||||
}, loaded =>
|
||||
{
|
||||
// ensure we are the most recent loaded wedge.
|
||||
@ -520,35 +527,5 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BeatmapInfoWedgeContainer : Container
|
||||
{
|
||||
private readonly WorkingBeatmap beatmap;
|
||||
private readonly RulesetInfo ruleset;
|
||||
private readonly StarDifficulty starDifficulty;
|
||||
private readonly IReadOnlyList<Mod> mods;
|
||||
|
||||
internal WedgeInfoText Info;
|
||||
|
||||
public BeatmapInfoWedgeContainer(WorkingBeatmap beatmap, RulesetInfo ruleset, IReadOnlyList<Mod> mods, StarDifficulty difficulty)
|
||||
{
|
||||
this.beatmap = beatmap;
|
||||
this.ruleset = ruleset;
|
||||
this.mods = mods;
|
||||
starDifficulty = difficulty;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BeatmapInfoWedgeBackground(beatmap),
|
||||
Info = new WedgeInfoText(beatmap, ruleset, mods, starDifficulty),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user