mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
Load imported scores to results screen rather than gameplay
This commit is contained in:
parent
83f26bcb81
commit
c3c5a99a22
@ -35,7 +35,6 @@ using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Online.Chat;
|
||||
using osu.Game.Skinning;
|
||||
@ -43,6 +42,8 @@ using osuTK.Graphics;
|
||||
using osu.Game.Overlays.Volume;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Updater;
|
||||
using osu.Game.Utils;
|
||||
@ -360,7 +361,7 @@ namespace osu.Game
|
||||
/// Present a score's replay immediately.
|
||||
/// The user should have already requested this interactively.
|
||||
/// </summary>
|
||||
public void PresentScore(ScoreInfo score)
|
||||
public void PresentScore(ScoreInfo score, ScorePresentType presentType = ScorePresentType.Results)
|
||||
{
|
||||
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
||||
// to ensure all the required data for presenting a replay are present.
|
||||
@ -392,9 +393,19 @@ namespace osu.Game
|
||||
|
||||
PerformFromScreen(screen =>
|
||||
{
|
||||
Ruleset.Value = databasedScore.ScoreInfo.Ruleset;
|
||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||
|
||||
screen.Push(new ReplayPlayerLoader(databasedScore));
|
||||
switch (presentType)
|
||||
{
|
||||
case ScorePresentType.Gameplay:
|
||||
screen.Push(new ReplayPlayerLoader(databasedScore));
|
||||
break;
|
||||
|
||||
case ScorePresentType.Results:
|
||||
screen.Push(new SoloResultsScreen(databasedScore.ScoreInfo));
|
||||
break;
|
||||
}
|
||||
}, validScreens: new[] { typeof(PlaySongSelect) });
|
||||
}
|
||||
|
||||
@ -1000,4 +1011,10 @@ namespace osu.Game
|
||||
Exit();
|
||||
}
|
||||
}
|
||||
|
||||
public enum ScorePresentType
|
||||
{
|
||||
Results,
|
||||
Gameplay
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Ranking
|
||||
switch (State.Value)
|
||||
{
|
||||
case DownloadState.LocallyAvailable:
|
||||
game?.PresentScore(Model.Value);
|
||||
game?.PresentScore(Model.Value, ScorePresentType.Gameplay);
|
||||
break;
|
||||
|
||||
case DownloadState.NotDownloaded:
|
||||
|
Loading…
Reference in New Issue
Block a user