1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-31 00:02:56 +08:00
osu-lazer/osu.Game/Overlays/Profile/Sections/Historical/PaginatedMostPlayedBeatmapContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.5 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
using System.Collections.Generic;
using osu.Framework.Allocation;
2019-02-21 18:04:31 +08:00
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
2021-07-17 22:20:37 +08:00
using osu.Game.Resources.Localisation.Web;
using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Overlays.Profile.Sections.Historical
{
2020-11-21 08:18:24 +08:00
public partial class PaginatedMostPlayedBeatmapContainer : PaginatedProfileSubsection<APIUserMostPlayedBeatmap>
{
2023-01-11 02:24:54 +08:00
public PaginatedMostPlayedBeatmapContainer(Bindable<UserProfileData?> user)
: base(user, UsersStrings.ShowExtraHistoricalMostPlayedTitle)
{
}
[BackgroundDependencyLoader]
private void load()
{
ItemsContainer.Direction = FillDirection.Vertical;
}
2018-04-13 17:19:50 +08:00
protected override int GetCount(APIUser user) => user.BeatmapPlayCountsCount;
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest(UserProfileData user, PaginationParameters pagination) =>
new GetUserMostPlayedBeatmapsRequest(user.User.Id, pagination);
protected override Drawable CreateDrawableItem(APIUserMostPlayedBeatmap mostPlayed) =>
new DrawableMostPlayedBeatmap(mostPlayed);
}
}