mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 14:22:55 +08:00
Rename Container to DisplayedContent
This commit is contained in:
parent
b6b9a69601
commit
fe9ade6754
@ -140,11 +140,11 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
|
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
|
||||||
{
|
{
|
||||||
containerBefore = infoWedge.Container;
|
containerBefore = infoWedge.DisplayedContent;
|
||||||
infoWedge.Beatmap = Beatmap.Value = b == null ? Beatmap.Default : CreateWorkingBeatmap(b);
|
infoWedge.Beatmap = Beatmap.Value = b == null ? Beatmap.Default : CreateWorkingBeatmap(b);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddUntilStep("wait for async load", () => infoWedge.Container != containerBefore);
|
AddUntilStep("wait for async load", () => infoWedge.DisplayedContent != containerBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBeatmap createTestBeatmap(RulesetInfo ruleset)
|
private IBeatmap createTestBeatmap(RulesetInfo ruleset)
|
||||||
@ -194,7 +194,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
|
|
||||||
private class TestBeatmapInfoWedge : BeatmapInfoWedge
|
private class TestBeatmapInfoWedge : BeatmapInfoWedge
|
||||||
{
|
{
|
||||||
public new Container Container => base.Container;
|
public new Container DisplayedContent => base.DisplayedContent;
|
||||||
|
|
||||||
public new WedgeInfoText Info => base.Info;
|
public new WedgeInfoText Info => base.Info;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private IBindable<StarDifficulty?> beatmapDifficulty;
|
private IBindable<StarDifficulty?> beatmapDifficulty;
|
||||||
|
|
||||||
protected Container Container;
|
protected Container DisplayedContent;
|
||||||
|
|
||||||
protected WedgeInfoText Info;
|
protected WedgeInfoText Info;
|
||||||
|
|
||||||
public BeatmapInfoWedge()
|
public BeatmapInfoWedge()
|
||||||
@ -110,7 +111,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsPresent => base.IsPresent || Container == null; // Visibility is updated in the LoadComponentAsync callback
|
public override bool IsPresent => base.IsPresent || DisplayedContent == null; // Visibility is updated in the LoadComponentAsync callback
|
||||||
|
|
||||||
private Container loadingInfo;
|
private Container loadingInfo;
|
||||||
|
|
||||||
@ -124,9 +125,9 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
State.Value = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
State.Value = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
||||||
|
|
||||||
Container?.FadeOut(250);
|
DisplayedContent?.FadeOut(250);
|
||||||
Container?.Expire();
|
DisplayedContent?.Expire();
|
||||||
Container = null;
|
DisplayedContent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (beatmap == null)
|
if (beatmap == null)
|
||||||
@ -139,7 +140,7 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Shear = -Shear,
|
Shear = -Shear,
|
||||||
Depth = Container?.Depth + 1 ?? 0,
|
Depth = DisplayedContent?.Depth + 1 ?? 0,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new BeatmapInfoWedgeBackground(beatmap),
|
new BeatmapInfoWedgeBackground(beatmap),
|
||||||
@ -151,7 +152,7 @@ namespace osu.Game.Screens.Select
|
|||||||
if (loaded != loadingInfo) return;
|
if (loaded != loadingInfo) return;
|
||||||
|
|
||||||
removeOldInfo();
|
removeOldInfo();
|
||||||
Add(Container = loaded);
|
Add(DisplayedContent = loaded);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user