1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-20 19:02:56 +08:00

Merge branch 'master' into master

This commit is contained in:
Paulo Henrique Prates 2019-04-07 09:32:00 -03:00 committed by GitHub
commit 13d9f97d53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -431,7 +431,7 @@ namespace osu.Game
loadComponentSingleFile(volume = new VolumeOverlay(), leftFloatingOverlayContent.Add);
loadComponentSingleFile(onscreenDisplay = new OnScreenDisplay(), Add);
loadComponentSingleFile(loginOverlay = new LoginOverlay
loadComponentSingleFile(notifications = new NotificationOverlay
{
GetToolbarHeight = () => ToolbarOffset,
Anchor = Anchor.TopRight,
@ -449,7 +449,7 @@ namespace osu.Game
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add);
loadComponentSingleFile(beatmapSetOverlay = new BeatmapSetOverlay(), overlayContent.Add);
loadComponentSingleFile(notifications = new NotificationOverlay
loadComponentSingleFile(loginOverlay = new LoginOverlay
{
GetToolbarHeight = () => ToolbarOffset,
Anchor = Anchor.TopRight,

View File

@ -103,6 +103,9 @@ namespace osu.Game.Screens.Menu
[Resolved(CanBeNull = true)]
private NotificationOverlay notifications { get; set; }
[Resolved(CanBeNull = true)]
private LoginOverlay loginOverlay { get; set; }
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, IdleTracker idleTracker, GameHost host)
{
@ -135,7 +138,12 @@ namespace osu.Game.Screens.Menu
notifications?.Post(new SimpleNotification
{
Text = "You gotta be logged in to multi 'yo!",
Icon = FontAwesome.Solid.Globe
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{
loginOverlay?.Show();
return true;
}
});
return;

View File

@ -55,7 +55,7 @@ namespace osu.Game.Screens.Select.Leaderboards
{
if (Scope == BeatmapLeaderboardScope.Local)
{
Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).ToArray();
Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).OrderByDescending(s => s.TotalScore).ToArray();
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
return null;
}