mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 07:22:54 +08:00
Don't show buttons on fail overlay when player interaction is disabled
This commit is contained in:
parent
98ab9853ce
commit
a4be28a2ae
@ -26,11 +26,22 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public override LocalisableString Header => GameplayMenuOverlayStrings.FailedHeader;
|
||||
|
||||
private readonly bool showButtons;
|
||||
|
||||
public FailOverlay(bool showButtons = true)
|
||||
{
|
||||
this.showButtons = showButtons;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AddButton(GameplayMenuOverlayStrings.Retry, colours.YellowDark, () => OnRetry?.Invoke());
|
||||
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
|
||||
if (showButtons)
|
||||
{
|
||||
AddButton(GameplayMenuOverlayStrings.Retry, colours.YellowDark, () => OnRetry?.Invoke());
|
||||
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
|
||||
}
|
||||
|
||||
// from #10339 maybe this is a better visual effect
|
||||
Add(new Container
|
||||
{
|
||||
|
@ -267,7 +267,7 @@ namespace osu.Game.Screens.Play
|
||||
createGameplayComponents(Beatmap.Value)
|
||||
}
|
||||
},
|
||||
FailOverlay = new FailOverlay
|
||||
FailOverlay = new FailOverlay(Configuration.AllowUserInteraction)
|
||||
{
|
||||
SaveReplay = async () => await prepareAndImportScoreAsync(true).ConfigureAwait(false),
|
||||
OnRetry = () => Restart(),
|
||||
|
Loading…
Reference in New Issue
Block a user