1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Consume SoloStatisticsWatcher updates in toolbar button

This commit is contained in:
Bartłomiej Dach 2024-02-09 17:15:52 +01:00
parent 14052ae1cc
commit eae43f5fd9
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Toolbar
private Statistic<decimal> pp = null!;
[BackgroundDependencyLoader]
private void load()
private void load(SoloStatisticsWatcher? soloStatisticsWatcher)
{
RelativeSizeAxes = Axes.Y;
AutoSizeAxes = Axes.X;
@ -45,6 +45,9 @@ namespace osu.Game.Overlays.Toolbar
pp = new Statistic<decimal>(RankingsStrings.StatPerformance, string.Empty, Comparer<decimal>.Create((before, after) => Math.Sign(after - before))),
}
};
if (soloStatisticsWatcher != null)
((IBindable<SoloStatisticsUpdate?>)LatestUpdate).BindTo(soloStatisticsWatcher.LatestUpdate);
}
protected override void LoadComplete()

View File

@ -41,9 +41,6 @@ namespace osu.Game.Screens.Ranking
public override bool? AllowGlobalTrackControl => true;
// Temporary for now to stop dual transitions. Should respect the current toolbar mode, but there's no way to do so currently.
public override bool HideOverlaysOnEnter => true;
public readonly Bindable<ScoreInfo> SelectedScore = new Bindable<ScoreInfo>();
[CanBeNull]