1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Show RankingsOverlay when clicking on charts button

This commit is contained in:
Lucas A 2020-02-22 09:39:17 +01:00
parent e21db7dbbe
commit c9d600b69c
3 changed files with 2 additions and 28 deletions

View File

@ -1,9 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Screens.Charts
{
public class ChartInfo : ScreenWhiteBox
{
}
}

View File

@ -1,16 +0,0 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
namespace osu.Game.Screens.Charts
{
public class ChartListing : ScreenWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[]
{
typeof(ChartInfo)
};
}
}

View File

@ -18,7 +18,6 @@ using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Overlays.Dialog;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Charts;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Select;
@ -73,7 +72,7 @@ namespace osu.Game.Screens.Menu
private SongTicker songTicker;
[BackgroundDependencyLoader(true)]
private void load(DirectOverlay direct, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics)
private void load(DirectOverlay direct, SettingsOverlay settings, RankingsOverlay rankings, OsuConfigManager config, SessionStatics statics)
{
holdDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
@ -101,7 +100,6 @@ namespace osu.Game.Screens.Menu
{
buttons = new ButtonSystem
{
OnChart = delegate { this.Push(new ChartListing()); },
OnEdit = delegate { this.Push(new Editor()); },
OnSolo = onSolo,
OnMulti = delegate { this.Push(new Multiplayer()); },
@ -136,6 +134,7 @@ namespace osu.Game.Screens.Menu
buttons.OnSettings = () => settings?.ToggleVisibility();
buttons.OnDirect = () => direct?.ToggleVisibility();
buttons.OnChart = () => rankings?.ToggleVisibility();
LoadComponentAsync(background = new BackgroundScreenDefault());
preloadSongSelect();