Remove overlay when viewing leaderboard scores

Do not add the hold-to-retry hotkey overlay if the user has navigated
to the results screen from the leaderboard and not from gameplay.
This commit is contained in:
Bartłomiej Dach 2019-11-04 01:57:31 +01:00
parent 3ec9580ba8
commit 539f8ad6dd

View File

@ -116,9 +116,7 @@ namespace osu.Game.Screens.Ranking
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
InternalChildren = new Drawable[]
{
new AspectContainer
InternalChild = new AspectContainer
{
RelativeSizeAxes = Axes.Y,
Anchor = Anchor.Centre,
@ -254,8 +252,11 @@ namespace osu.Game.Screens.Ranking
}
}
}
},
new HotkeyRetryOverlay
};
if (player != null)
{
AddInternal(new HotkeyRetryOverlay
{
Action = () =>
{
@ -263,8 +264,8 @@ namespace osu.Game.Screens.Ranking
player?.Restart();
},
},
};
});
}
var pages = CreateResultPages();