mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Integrate spotlight beatmap badge in listing cards
This commit is contained in:
@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
Height = height;
|
Height = height;
|
||||||
|
|
||||||
FillFlowContainer leftIconArea = null!;
|
FillFlowContainer leftIconArea = null!;
|
||||||
GridContainer titleContainer = null!;
|
FillFlowContainer titleBadgeArea = null!;
|
||||||
GridContainer artistContainer = null!;
|
GridContainer artistContainer = null!;
|
||||||
|
|
||||||
Child = content.With(c =>
|
Child = content.With(c =>
|
||||||
@ -93,7 +93,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
titleContainer = new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
@ -108,7 +108,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
},
|
},
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -117,7 +117,13 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Truncate = true
|
Truncate = true
|
||||||
},
|
},
|
||||||
Empty()
|
titleBadgeArea = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomRight,
|
||||||
|
Origin = Anchor.BottomRight,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -244,14 +250,24 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
if (BeatmapSet.HasStoryboard)
|
if (BeatmapSet.HasStoryboard)
|
||||||
leftIconArea.Add(new IconPill(FontAwesome.Solid.Image) { IconSize = new Vector2(20) });
|
leftIconArea.Add(new IconPill(FontAwesome.Solid.Image) { IconSize = new Vector2(20) });
|
||||||
|
|
||||||
if (BeatmapSet.HasExplicitContent)
|
if (BeatmapSet.FeaturedInSpotlight)
|
||||||
{
|
{
|
||||||
titleContainer.Content[0][1] = new ExplicitContentBeatmapPill
|
titleBadgeArea.Add(new SpotlightBeatmapPill
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
Margin = new MarginPadding { Left = 5 }
|
Margin = new MarginPadding { Left = 5 }
|
||||||
};
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BeatmapSet.HasExplicitContent)
|
||||||
|
{
|
||||||
|
titleBadgeArea.Add(new ExplicitContentBeatmapPill
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomRight,
|
||||||
|
Origin = Anchor.BottomRight,
|
||||||
|
Margin = new MarginPadding { Left = 5 }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BeatmapSet.TrackId != null)
|
if (BeatmapSet.TrackId != null)
|
||||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
Height = height;
|
Height = height;
|
||||||
|
|
||||||
FillFlowContainer leftIconArea = null!;
|
FillFlowContainer leftIconArea = null!;
|
||||||
GridContainer titleContainer = null!;
|
FillFlowContainer titleBadgeArea = null!;
|
||||||
GridContainer artistContainer = null!;
|
GridContainer artistContainer = null!;
|
||||||
|
|
||||||
Child = content.With(c =>
|
Child = content.With(c =>
|
||||||
@ -94,14 +94,14 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
titleContainer = new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
ColumnDimensions = new[]
|
ColumnDimensions = new[]
|
||||||
{
|
{
|
||||||
new Dimension(),
|
new Dimension(),
|
||||||
new Dimension(GridSizeMode.AutoSize)
|
new Dimension(GridSizeMode.AutoSize),
|
||||||
},
|
},
|
||||||
RowDimensions = new[]
|
RowDimensions = new[]
|
||||||
{
|
{
|
||||||
@ -109,7 +109,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
},
|
},
|
||||||
Content = new[]
|
Content = new[]
|
||||||
{
|
{
|
||||||
new[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -118,7 +118,13 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Truncate = true
|
Truncate = true
|
||||||
},
|
},
|
||||||
Empty()
|
titleBadgeArea = new FillFlowContainer
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomRight,
|
||||||
|
Origin = Anchor.BottomRight,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -225,14 +231,24 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
if (BeatmapSet.HasStoryboard)
|
if (BeatmapSet.HasStoryboard)
|
||||||
leftIconArea.Add(new IconPill(FontAwesome.Solid.Image) { IconSize = new Vector2(20) });
|
leftIconArea.Add(new IconPill(FontAwesome.Solid.Image) { IconSize = new Vector2(20) });
|
||||||
|
|
||||||
if (BeatmapSet.HasExplicitContent)
|
if (BeatmapSet.FeaturedInSpotlight)
|
||||||
{
|
{
|
||||||
titleContainer.Content[0][1] = new ExplicitContentBeatmapPill
|
titleBadgeArea.Add(new SpotlightBeatmapPill
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
Margin = new MarginPadding { Left = 5 }
|
Margin = new MarginPadding { Left = 5 }
|
||||||
};
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BeatmapSet.HasExplicitContent)
|
||||||
|
{
|
||||||
|
titleBadgeArea.Add(new ExplicitContentBeatmapPill
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomRight,
|
||||||
|
Origin = Anchor.BottomRight,
|
||||||
|
Margin = new MarginPadding { Left = 5 }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BeatmapSet.TrackId != null)
|
if (BeatmapSet.TrackId != null)
|
||||||
|
Reference in New Issue
Block a user