1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Rename Container to DisplayedContent

This commit is contained in:
Dean Herbert 2021-05-06 02:14:04 +09:00
parent b6b9a69601
commit fe9ade6754
2 changed files with 11 additions and 10 deletions

View File

@ -140,11 +140,11 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep($"select {b?.Metadata.Title ?? "null"} beatmap", () =>
{
containerBefore = infoWedge.Container;
containerBefore = infoWedge.DisplayedContent;
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)
@ -194,7 +194,7 @@ namespace osu.Game.Tests.Visual.SongSelect
private class TestBeatmapInfoWedge : BeatmapInfoWedge
{
public new Container Container => base.Container;
public new Container DisplayedContent => base.DisplayedContent;
public new WedgeInfoText Info => base.Info;
}

View File

@ -48,7 +48,8 @@ namespace osu.Game.Screens.Select
private IBindable<StarDifficulty?> beatmapDifficulty;
protected Container Container;
protected Container DisplayedContent;
protected WedgeInfoText Info;
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;
@ -124,9 +125,9 @@ namespace osu.Game.Screens.Select
{
State.Value = beatmap == null ? Visibility.Hidden : Visibility.Visible;
Container?.FadeOut(250);
Container?.Expire();
Container = null;
DisplayedContent?.FadeOut(250);
DisplayedContent?.Expire();
DisplayedContent = null;
}
if (beatmap == null)
@ -139,7 +140,7 @@ namespace osu.Game.Screens.Select
{
RelativeSizeAxes = Axes.Both,
Shear = -Shear,
Depth = Container?.Depth + 1 ?? 0,
Depth = DisplayedContent?.Depth + 1 ?? 0,
Children = new Drawable[]
{
new BeatmapInfoWedgeBackground(beatmap),
@ -151,7 +152,7 @@ namespace osu.Game.Screens.Select
if (loaded != loadingInfo) return;
removeOldInfo();
Add(Container = loaded);
Add(DisplayedContent = loaded);
});
}
}