mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
item -> model
This commit is contained in:
parent
3942c83c18
commit
bef44b8e58
@ -31,9 +31,9 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps
|
||||
protected override APIRequest<List<APIBeatmapSet>> CreateRequest() =>
|
||||
new GetUserBeatmapsRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIBeatmapSet item) => !item.OnlineBeatmapSetID.HasValue
|
||||
protected override Drawable CreateDrawableItem(APIBeatmapSet model) => !model.OnlineBeatmapSetID.HasValue
|
||||
? null
|
||||
: new DirectGridPanel(item.ToBeatmapSet(Rulesets))
|
||||
: new DirectGridPanel(model.ToBeatmapSet(Rulesets))
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
protected override APIRequest<List<APIUserMostPlayedBeatmap>> CreateRequest() =>
|
||||
new GetUserMostPlayedBeatmapsRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIUserMostPlayedBeatmap item) =>
|
||||
new DrawableMostPlayedBeatmap(item.GetBeatmapInfo(Rulesets), item.PlayCount);
|
||||
protected override Drawable CreateDrawableItem(APIUserMostPlayedBeatmap model) =>
|
||||
new DrawableMostPlayedBeatmap(model.GetBeatmapInfo(Rulesets), model.PlayCount);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
|
||||
protected abstract APIRequest<List<TModel>> CreateRequest();
|
||||
|
||||
protected abstract Drawable CreateDrawableItem(TModel item);
|
||||
protected abstract Drawable CreateDrawableItem(TModel model);
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
|
@ -40,15 +40,15 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
protected override APIRequest<List<APILegacyScoreInfo>> CreateRequest() =>
|
||||
new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APILegacyScoreInfo item)
|
||||
protected override Drawable CreateDrawableItem(APILegacyScoreInfo model)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
return new DrawablePerformanceScore(item, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null);
|
||||
return new DrawablePerformanceScore(model, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null);
|
||||
|
||||
case ScoreType.Recent:
|
||||
return new DrawableTotalScore(item);
|
||||
return new DrawableTotalScore(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,6 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
|
||||
protected override APIRequest<List<APIRecentActivity>> CreateRequest() =>
|
||||
new GetUserRecentActivitiesRequest(User.Value.Id, VisiblePages++, ItemsPerPage);
|
||||
|
||||
protected override Drawable CreateDrawableItem(APIRecentActivity item) => new DrawableRecentActivity(item);
|
||||
protected override Drawable CreateDrawableItem(APIRecentActivity model) => new DrawableRecentActivity(model);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user