1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Add support for position

This commit is contained in:
smoogipoo 2020-08-31 20:01:59 +09:00
parent 77698ec31e
commit 6ed191786f
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("user")]
public User User { get; set; }
[JsonProperty("position")]
public int? Position { get; set; }
public ScoreInfo CreateScoreInfo() =>
new ScoreInfo
{
@ -40,6 +43,7 @@ namespace osu.Game.Online.API.Requests.Responses
PP = PP,
TotalScore = TotalScore,
User = User,
Position = Position
};
}
}

View File

@ -50,7 +50,7 @@ namespace osu.Game.Screens.Multi.Match.Components
protected override LeaderboardScore CreateDrawableScore(APIUserScoreAggregate model, int index) => new MatchLeaderboardScore(model, index);
protected override LeaderboardScore CreateDrawableTopScore(APIUserScoreAggregate model) => new MatchLeaderboardScore(model, 0);
protected override LeaderboardScore CreateDrawableTopScore(APIUserScoreAggregate model) => new MatchLeaderboardScore(model, model.Position ?? 0);
}
public enum MatchLeaderboardScope