mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:13:22 +08:00
Add hold-to-retry support to results
This commit is contained in:
parent
84d17f3702
commit
c532f77657
@ -19,6 +19,7 @@ using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
@ -34,6 +35,9 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
private ResultModeTabControl modeChangeButtons;
|
||||
|
||||
[Resolved(canBeNull: true)]
|
||||
private Player player { get; set; }
|
||||
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
protected readonly ScoreInfo Score;
|
||||
@ -100,10 +104,7 @@ namespace osu.Game.Screens.Ranking
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
{
|
||||
allCircles.ForEach(c =>
|
||||
{
|
||||
c.ScaleTo(0, transition_time, Easing.OutSine);
|
||||
});
|
||||
allCircles.ForEach(c => { c.ScaleTo(0, transition_time, Easing.OutSine); });
|
||||
|
||||
Background.ScaleTo(1f, transition_time / 4, Easing.OutQuint);
|
||||
|
||||
@ -253,7 +254,17 @@ namespace osu.Game.Screens.Ranking
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
new HotkeyRetryOverlay
|
||||
{
|
||||
Action = () =>
|
||||
{
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
player.Restart();
|
||||
player.MakeCurrent();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
var pages = CreateResultPages();
|
||||
|
Loading…
Reference in New Issue
Block a user