mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Add counter to most played beatmaps section in user overlay
This commit is contained in:
parent
8a2addbf3d
commit
7177dd5d82
@ -16,7 +16,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
public class PaginatedMostPlayedBeatmapContainer : PaginatedContainer<APIUserMostPlayedBeatmap>
|
||||
{
|
||||
public PaginatedMostPlayedBeatmapContainer(Bindable<User> user)
|
||||
: base(user, "Most Played Beatmaps", "No records. :(")
|
||||
: base(user, "Most Played Beatmaps", "No records. :(", CounterVisibilityState.AlwaysVisible)
|
||||
{
|
||||
ItemsPerPage = 5;
|
||||
}
|
||||
@ -27,6 +27,8 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
ItemsContainer.Direction = FillDirection.Vertical;
|
||||
}
|
||||
|
||||
protected override int GetCount(User user) => user.BeatmapPlaycountsCount;
|
||||
|
||||
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest() =>
|
||||
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
||||
|
||||
|
@ -144,6 +144,9 @@ namespace osu.Game.Users
|
||||
[JsonProperty(@"scores_first_count")]
|
||||
public int ScoresFirstCount;
|
||||
|
||||
[JsonProperty(@"beatmap_playcounts_count")]
|
||||
public int BeatmapPlaycountsCount;
|
||||
|
||||
[JsonProperty]
|
||||
private string[] playstyle
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user