mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Add hold-to-retry support to results
This commit is contained in:
@ -19,6 +19,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Ranking
|
namespace osu.Game.Screens.Ranking
|
||||||
{
|
{
|
||||||
@ -34,6 +35,9 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
private ResultModeTabControl modeChangeButtons;
|
private ResultModeTabControl modeChangeButtons;
|
||||||
|
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private Player player { get; set; }
|
||||||
|
|
||||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
protected readonly ScoreInfo Score;
|
protected readonly ScoreInfo Score;
|
||||||
@ -100,10 +104,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
public override bool OnExiting(IScreen next)
|
public override bool OnExiting(IScreen next)
|
||||||
{
|
{
|
||||||
allCircles.ForEach(c =>
|
allCircles.ForEach(c => { c.ScaleTo(0, transition_time, Easing.OutSine); });
|
||||||
{
|
|
||||||
c.ScaleTo(0, transition_time, Easing.OutSine);
|
|
||||||
});
|
|
||||||
|
|
||||||
Background.ScaleTo(1f, transition_time / 4, Easing.OutQuint);
|
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();
|
var pages = CreateResultPages();
|
||||||
|
Reference in New Issue
Block a user