1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:58:21 +08:00
osu-lazer/osu.Game/Screens/Ranking/SoloResultsScreen.cs
2020-05-26 17:00:41 +09:00

33 lines
991 B
C#

// 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.
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Scoring;
namespace osu.Game.Screens.Ranking
{
public class SoloResultsScreen : ResultsScreen
{
[Resolved]
private RulesetStore rulesets { get; set; }
public SoloResultsScreen(ScoreInfo score, bool allowRetry = true)
: base(score, allowRetry)
{
}
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback)
{
var req = new GetScoresRequest(Score.Beatmap, Score.Ruleset);
req.Success += r => scoresCallback?.Invoke(r.Scores.Select(s => s.CreateScoreInfo(rulesets)));
return req;
}
}
}