mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 23:07:26 +08:00
Merge branch 'master' into implement-other-sorting-criteria
This commit is contained in:
commit
1eed6955fa
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Catch.Tests.iOS
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UIApplication.Main(args, null, "AppDelegate");
|
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Mania.Tests.iOS
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UIApplication.Main(args, null, "AppDelegate");
|
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Osu.Tests.iOS
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UIApplication.Main(args, null, "AppDelegate");
|
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.iOS
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UIApplication.Main(args, null, "AppDelegate");
|
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Tests.iOS
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
UIApplication.Main(args, null, "AppDelegate");
|
UIApplication.Main(args, "GameUIApplication", "AppDelegate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,11 +282,9 @@ namespace osu.Game
|
|||||||
|
|
||||||
performFromMainMenu(() =>
|
performFromMainMenu(() =>
|
||||||
{
|
{
|
||||||
Ruleset.Value = databasedScoreInfo.Ruleset;
|
|
||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||||
Mods.Value = databasedScoreInfo.Mods;
|
|
||||||
|
|
||||||
menuScreen.Push(new PlayerLoader(() => new ReplayPlayer(databasedScore)));
|
menuScreen.Push(new ReplayPlayerLoader(databasedScore));
|
||||||
}, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true);
|
}, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
34
osu.Game/Screens/Play/ReplayPlayerLoader.cs
Normal file
34
osu.Game/Screens/Play/ReplayPlayerLoader.cs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// 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 osu.Framework.Allocation;
|
||||||
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
|
namespace osu.Game.Screens.Play
|
||||||
|
{
|
||||||
|
public class ReplayPlayerLoader : PlayerLoader
|
||||||
|
{
|
||||||
|
private readonly ScoreInfo scoreInfo;
|
||||||
|
|
||||||
|
public ReplayPlayerLoader(Score score)
|
||||||
|
: base(() => new ReplayPlayer(score))
|
||||||
|
{
|
||||||
|
if (score.Replay == null)
|
||||||
|
throw new ArgumentNullException(nameof(score.Replay), $"{nameof(score)} must have a non-null {nameof(score.Replay)}.");
|
||||||
|
|
||||||
|
scoreInfo = score.ScoreInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
|
{
|
||||||
|
var dependencies = base.CreateChildDependencies(parent);
|
||||||
|
|
||||||
|
// these will be reverted thanks to PlayerLoader's lease.
|
||||||
|
Mods.Value = scoreInfo.Mods;
|
||||||
|
Ruleset.Value = scoreInfo.Ruleset;
|
||||||
|
|
||||||
|
return dependencies;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user