mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 10:12:53 +08:00
Merge pull request #7955 from Game4all/chart-button-rankings
Open Rankings when clicking on charts button
This commit is contained in:
commit
8bdeac248c
@ -138,6 +138,12 @@ namespace osu.Game.Overlays
|
|||||||
Country.Value = requested;
|
Country.Value = requested;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowSpotlights()
|
||||||
|
{
|
||||||
|
Scope.Value = RankingsScope.Spotlights;
|
||||||
|
Show();
|
||||||
|
}
|
||||||
|
|
||||||
private void loadNewContent()
|
private void loadNewContent()
|
||||||
{
|
{
|
||||||
loading.Show();
|
loading.Show();
|
||||||
|
@ -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
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
@ -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)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@ -18,7 +18,6 @@ using osu.Game.Online.API;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Dialog;
|
using osu.Game.Overlays.Dialog;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osu.Game.Screens.Charts;
|
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
@ -73,7 +72,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private SongTicker songTicker;
|
private SongTicker songTicker;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[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);
|
holdDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||||
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
||||||
@ -101,7 +100,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
buttons = new ButtonSystem
|
buttons = new ButtonSystem
|
||||||
{
|
{
|
||||||
OnChart = delegate { this.Push(new ChartListing()); },
|
|
||||||
OnEdit = delegate { this.Push(new Editor()); },
|
OnEdit = delegate { this.Push(new Editor()); },
|
||||||
OnSolo = onSolo,
|
OnSolo = onSolo,
|
||||||
OnMulti = delegate { this.Push(new Multiplayer()); },
|
OnMulti = delegate { this.Push(new Multiplayer()); },
|
||||||
@ -136,6 +134,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
buttons.OnSettings = () => settings?.ToggleVisibility();
|
buttons.OnSettings = () => settings?.ToggleVisibility();
|
||||||
buttons.OnDirect = () => direct?.ToggleVisibility();
|
buttons.OnDirect = () => direct?.ToggleVisibility();
|
||||||
|
buttons.OnChart = () => rankings?.ShowSpotlights();
|
||||||
|
|
||||||
LoadComponentAsync(background = new BackgroundScreenDefault());
|
LoadComponentAsync(background = new BackgroundScreenDefault());
|
||||||
preloadSongSelect();
|
preloadSongSelect();
|
||||||
|
Loading…
Reference in New Issue
Block a user