1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 06:12:58 +08:00

Bind with global ruleset for now

This commit is contained in:
Dean Herbert 2020-02-21 18:54:48 +09:00
parent 556131cd5f
commit 81f9103f9c

View File

@ -23,8 +23,6 @@ namespace osu.Game.Overlays
protected Bindable<RankingsScope> Scope => header.Current; protected Bindable<RankingsScope> Scope => header.Current;
private Bindable<RulesetInfo> ruleset => header.Ruleset;
private readonly BasicScrollContainer scrollFlow; private readonly BasicScrollContainer scrollFlow;
private readonly Container contentContainer; private readonly Container contentContainer;
private readonly DimmedLoadingLayer loading; private readonly DimmedLoadingLayer loading;
@ -92,10 +90,15 @@ namespace osu.Game.Overlays
background.Colour = ColourProvider.Background5; background.Colour = ColourProvider.Background5;
} }
[Resolved]
private Bindable<RulesetInfo> ruleset { get; set; }
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
header.Ruleset.BindTo(ruleset);
Country.BindValueChanged(_ => Country.BindValueChanged(_ =>
{ {
// if a country is requested, force performance scope. // if a country is requested, force performance scope.
@ -121,6 +124,8 @@ namespace osu.Game.Overlays
Scheduler.AddOnce(loadNewContent); Scheduler.AddOnce(loadNewContent);
}); });
Scheduler.AddOnce(loadNewContent);
} }
public void ShowCountry(Country requested) public void ShowCountry(Country requested)
@ -130,7 +135,7 @@ namespace osu.Game.Overlays
Show(); Show();
Schedule(() => Country.Value = requested); Country.Value = requested;
} }
private void loadNewContent() private void loadNewContent()