2020-08-01 11:23:06 +08:00
|
|
|
|
// 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.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
2021-11-01 15:02:00 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2020-08-01 11:23:06 +08:00
|
|
|
|
using osuTK;
|
|
|
|
|
|
2020-08-03 02:47:09 +08:00
|
|
|
|
namespace osu.Game.Overlays.Dashboard.Home
|
2020-08-01 11:23:06 +08:00
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class DashboardPopularBeatmapPanel : DashboardBeatmapPanel
|
2020-08-01 11:23:06 +08:00
|
|
|
|
{
|
2021-11-01 15:02:00 +08:00
|
|
|
|
public DashboardPopularBeatmapPanel(APIBeatmapSet beatmapSet)
|
|
|
|
|
: base(beatmapSet)
|
2020-08-01 11:23:06 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override Drawable CreateInfo() => new FillFlowContainer
|
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
Direction = FillDirection.Horizontal,
|
|
|
|
|
Spacing = new Vector2(3, 0),
|
|
|
|
|
Colour = ColourProvider.Foreground1,
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new SpriteIcon
|
|
|
|
|
{
|
|
|
|
|
Size = new Vector2(10),
|
|
|
|
|
Icon = FontAwesome.Solid.Heart
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
2020-08-03 14:55:06 +08:00
|
|
|
|
Font = OsuFont.GetFont(size: 10, weight: FontWeight.Regular),
|
2021-11-01 15:02:00 +08:00
|
|
|
|
Text = BeatmapSet.FavouriteCount.ToString()
|
2020-08-01 11:23:06 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|