mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 21:33:04 +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;
|
public override LocalisableString Header => GameplayMenuOverlayStrings.FailedHeader;
|
||||||
|
|
||||||
|
private readonly bool showButtons;
|
||||||
|
|
||||||
|
public FailOverlay(bool showButtons = true)
|
||||||
|
{
|
||||||
|
this.showButtons = showButtons;
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
AddButton(GameplayMenuOverlayStrings.Retry, colours.YellowDark, () => OnRetry?.Invoke());
|
if (showButtons)
|
||||||
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
|
{
|
||||||
|
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
|
// from #10339 maybe this is a better visual effect
|
||||||
Add(new Container
|
Add(new Container
|
||||||
{
|
{
|
||||||
|
@ -267,7 +267,7 @@ namespace osu.Game.Screens.Play
|
|||||||
createGameplayComponents(Beatmap.Value)
|
createGameplayComponents(Beatmap.Value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
FailOverlay = new FailOverlay
|
FailOverlay = new FailOverlay(Configuration.AllowUserInteraction)
|
||||||
{
|
{
|
||||||
SaveReplay = async () => await prepareAndImportScoreAsync(true).ConfigureAwait(false),
|
SaveReplay = async () => await prepareAndImportScoreAsync(true).ConfigureAwait(false),
|
||||||
OnRetry = () => Restart(),
|
OnRetry = () => Restart(),
|
||||||
|
Loading…
Reference in New Issue
Block a user