1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 04:17:18 +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.

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