mirror of
https://github.com/osukey/osukey.git
synced 2025-06-29 15:17:57 +09:00
Move "extra info" beatmap card row to separate component
This commit is contained in:
parent
3fea8d5e62
commit
250e5b47b7
@ -276,29 +276,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
AlwaysPresent = true,
|
AlwaysPresent = true,
|
||||||
ChildrenEnumerable = createStatistics()
|
ChildrenEnumerable = createStatistics()
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new BeatmapCardExtraInfoRow(beatmapSet)
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
AutoSizeAxes = Axes.Y,
|
|
||||||
Direction = FillDirection.Horizontal,
|
|
||||||
Spacing = new Vector2(4, 0),
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new BeatmapSetOnlineStatusPill
|
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Both,
|
|
||||||
Status = beatmapSet.Status,
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft
|
|
||||||
},
|
|
||||||
new DifficultySpectrumDisplay(beatmapSet)
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
DotSize = new Vector2(6, 12)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downloadProgressBar = new BeatmapCardDownloadProgressBar
|
downloadProgressBar = new BeatmapCardDownloadProgressBar
|
||||||
|
43
osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtraInfoRow.cs
Normal file
43
osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtraInfoRow.cs
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
|
namespace osu.Game.Beatmaps.Drawables.Cards
|
||||||
|
{
|
||||||
|
public class BeatmapCardExtraInfoRow : CompositeDrawable
|
||||||
|
{
|
||||||
|
public BeatmapCardExtraInfoRow(APIBeatmapSet beatmapSet)
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X;
|
||||||
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
|
InternalChild = new FillFlowContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Spacing = new Vector2(4, 0),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new BeatmapSetOnlineStatusPill
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Status = beatmapSet.Status,
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft
|
||||||
|
},
|
||||||
|
new DifficultySpectrumDisplay(beatmapSet)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
DotSize = new Vector2(6, 12)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user