1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:07:26 +08:00

deal with test

This commit is contained in:
cdwcgt 2022-06-21 00:54:50 +09:00
parent 5a5cc523ce
commit 43ead5820a
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2
2 changed files with 5 additions and 4 deletions

View File

@ -19,9 +19,9 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
AddButton("Save replay and Quit", colours.Blue, () => SaveReplay?.Invoke());
AddButton("Retry", colours.YellowDark, () => OnRetry?.Invoke()); AddButton("Retry", colours.YellowDark, () => OnRetry?.Invoke());
AddButton("Quit", new Color4(170, 27, 39, 255), () => OnQuit?.Invoke()); AddButton("Quit", new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
AddButton("Save replay and Quit", colours.Blue, () => SaveReplay?.Invoke());
} }
} }
} }

View File

@ -1044,18 +1044,19 @@ namespace osu.Game.Screens.Play
return base.OnExiting(e); return base.OnExiting(e);
} }
// Don't know if prepareScoreForResults useful private void saveReplay()
private async void saveReplay()
{ {
var scoreCopy = Score.DeepClone(); var scoreCopy = Score.DeepClone();
try try
{ {
await ImportScore(scoreCopy).ConfigureAwait(false); ImportScore(scoreCopy).ConfigureAwait(false);
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.Error(ex, @"Score import failed!"); Logger.Error(ex, @"Score import failed!");
} }
PerformExit(true); PerformExit(true);
} }