mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Rename BeatmapCard{ => Normal}
This commit is contained in:
parent
2707b2fbda
commit
88d4e95ad8
@ -252,7 +252,7 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
[Test]
|
||||
public void TestNormal()
|
||||
{
|
||||
createTestCase(beatmapSetInfo => new BeatmapCard(beatmapSetInfo));
|
||||
createTestCase(beatmapSetInfo => new BeatmapCardNormal(beatmapSetInfo));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -264,7 +264,7 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
[Test]
|
||||
public void TestHoverState()
|
||||
{
|
||||
AddStep("create cards", () => Child = createContent(OverlayColourScheme.Blue, s => new BeatmapCard(s)));
|
||||
AddStep("create cards", () => Child = createContent(OverlayColourScheme.Blue, s => new BeatmapCardNormal(s)));
|
||||
|
||||
AddStep("Hover card", () => InputManager.MoveMouseTo(firstCard()));
|
||||
AddWaitStep("wait for potential state change", 5);
|
||||
@ -281,10 +281,10 @@ namespace osu.Game.Tests.Visual.Beatmaps
|
||||
AddWaitStep("wait for potential state change", 5);
|
||||
AddAssert("card is still expanded", () => firstCard().Expanded.Value);
|
||||
|
||||
AddStep("Hover away", () => InputManager.MoveMouseTo(this.ChildrenOfType<BeatmapCard>().Last()));
|
||||
AddStep("Hover away", () => InputManager.MoveMouseTo(this.ChildrenOfType<BeatmapCardNormal>().Last()));
|
||||
AddUntilStep("card is not expanded", () => !firstCard().Expanded.Value);
|
||||
|
||||
BeatmapCard firstCard() => this.ChildrenOfType<BeatmapCard>().First();
|
||||
BeatmapCardNormal firstCard() => this.ChildrenOfType<BeatmapCardNormal>().First();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
{
|
||||
public class BeatmapCard : BeatmapCardBase
|
||||
public class BeatmapCardNormal : BeatmapCardBase
|
||||
{
|
||||
protected override Drawable IdleContent => idleBottomContent;
|
||||
protected override Drawable DownloadInProgressContent => downloadProgressBar;
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
public BeatmapCard(APIBeatmapSet beatmapSet, bool allowExpansion = true)
|
||||
public BeatmapCardNormal(APIBeatmapSet beatmapSet, bool allowExpansion = true)
|
||||
: base(beatmapSet, allowExpansion)
|
||||
{
|
||||
content = new BeatmapCardContent(height);
|
@ -33,7 +33,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
private Drawable currentContent;
|
||||
private Container panelTarget;
|
||||
private FillFlowContainer<BeatmapCard> foundContent;
|
||||
private FillFlowContainer<BeatmapCardNormal> foundContent;
|
||||
private NotFoundDrawable notFoundContent;
|
||||
private SupporterRequiredDrawable supporterRequiredContent;
|
||||
private BeatmapListingFilterControl filterControl;
|
||||
@ -78,7 +78,7 @@ namespace osu.Game.Overlays
|
||||
Padding = new MarginPadding { Horizontal = 20 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
foundContent = new FillFlowContainer<BeatmapCard>(),
|
||||
foundContent = new FillFlowContainer<BeatmapCardNormal>(),
|
||||
notFoundContent = new NotFoundDrawable(),
|
||||
supporterRequiredContent = new SupporterRequiredDrawable(),
|
||||
}
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Overlays
|
||||
return;
|
||||
}
|
||||
|
||||
var newPanels = searchResult.Results.Select(b => new BeatmapCard(b)
|
||||
var newPanels = searchResult.Results.Select(b => new BeatmapCardNormal(b)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -152,7 +152,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
// spawn new children with the contained so we only clear old content at the last moment.
|
||||
// reverse ID flow is required for correct Z-ordering of the cards' expandable content (last card should be front-most).
|
||||
var content = new ReverseChildIDFillFlowContainer<BeatmapCard>
|
||||
var content = new ReverseChildIDFillFlowContainer<BeatmapCardNormal>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => model.OnlineID > 0
|
||||
? new BeatmapCard(model)
|
||||
? new BeatmapCardNormal(model)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -136,12 +136,12 @@ namespace osu.Game.Overlays.Rankings
|
||||
{
|
||||
new ScoresTable(1, response.Users),
|
||||
// reverse ID flow is required for correct Z-ordering of the cards' expandable content (last card should be front-most).
|
||||
new ReverseChildIDFillFlowContainer<BeatmapCard>
|
||||
new ReverseChildIDFillFlowContainer<BeatmapCardNormal>
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Spacing = new Vector2(10),
|
||||
Children = response.BeatmapSets.Select(b => new BeatmapCard(b)
|
||||
Children = response.BeatmapSets.Select(b => new BeatmapCardNormal(b)
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -228,7 +228,7 @@ namespace osu.Game.Screens.Play
|
||||
onlineBeatmapRequest.Success += beatmapSet => Schedule(() =>
|
||||
{
|
||||
this.beatmapSet = beatmapSet;
|
||||
beatmapPanelContainer.Child = new BeatmapCard(this.beatmapSet, allowExpansion: false);
|
||||
beatmapPanelContainer.Child = new BeatmapCardNormal(this.beatmapSet, allowExpansion: false);
|
||||
checkForAutomaticDownload();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user