mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 05:52:54 +08:00
Move retry and exit hotkey overlays to same depth / container
This commit is contained in:
parent
e9f50179ab
commit
7a5a612896
@ -246,16 +246,37 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
OnRetry = Restart,
|
OnRetry = Restart,
|
||||||
OnQuit = () => PerformExit(true),
|
OnQuit = () => PerformExit(true),
|
||||||
}
|
},
|
||||||
|
new HotkeyExitOverlay
|
||||||
|
{
|
||||||
|
Action = () =>
|
||||||
|
{
|
||||||
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
|
fadeOut(true);
|
||||||
|
PerformExit(false);
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (Configuration.AllowRestart)
|
||||||
|
{
|
||||||
|
rulesetSkinProvider.Add(new HotkeyRetryOverlay
|
||||||
|
{
|
||||||
|
Action = () =>
|
||||||
|
{
|
||||||
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
|
fadeOut(true);
|
||||||
|
Restart();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// add the overlay components as a separate step as they proxy some elements from the above underlay/gameplay components.
|
// add the overlay components as a separate step as they proxy some elements from the above underlay/gameplay components.
|
||||||
// also give the overlays the ruleset skin provider to allow rulesets to potentially override HUD elements (used to disable combo counters etc.)
|
// also give the overlays the ruleset skin provider to allow rulesets to potentially override HUD elements (used to disable combo counters etc.)
|
||||||
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
|
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
|
||||||
failAnimationLayer.AddRange(new[]
|
failAnimationLayer.Add(createOverlayComponents(Beatmap.Value));
|
||||||
{
|
|
||||||
createOverlayComponents(Beatmap.Value),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!DrawableRuleset.AllowGameplayOverlays)
|
if (!DrawableRuleset.AllowGameplayOverlays)
|
||||||
{
|
{
|
||||||
@ -356,16 +377,6 @@ namespace osu.Game.Screens.Play
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new HotkeyExitOverlay
|
|
||||||
{
|
|
||||||
Action = () =>
|
|
||||||
{
|
|
||||||
if (!this.IsCurrentScreen()) return;
|
|
||||||
|
|
||||||
fadeOut(true);
|
|
||||||
PerformExit(false);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
DimmableStoryboard.OverlayLayerContainer.CreateProxy(),
|
DimmableStoryboard.OverlayLayerContainer.CreateProxy(),
|
||||||
BreakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
BreakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||||
{
|
{
|
||||||
@ -419,20 +430,6 @@ namespace osu.Game.Screens.Play
|
|||||||
if (GameplayClockContainer is MasterGameplayClockContainer master)
|
if (GameplayClockContainer is MasterGameplayClockContainer master)
|
||||||
HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.BindTarget = master.UserPlaybackRate;
|
HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.UserPlaybackRate.BindTarget = master.UserPlaybackRate;
|
||||||
|
|
||||||
if (Configuration.AllowRestart)
|
|
||||||
{
|
|
||||||
container.Add(new HotkeyRetryOverlay
|
|
||||||
{
|
|
||||||
Action = () =>
|
|
||||||
{
|
|
||||||
if (!this.IsCurrentScreen()) return;
|
|
||||||
|
|
||||||
fadeOut(true);
|
|
||||||
Restart();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user