mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Consume SoloStatisticsWatcher
updates in toolbar button
This commit is contained in:
parent
14052ae1cc
commit
eae43f5fd9
@ -26,7 +26,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
private Statistic<decimal> pp = null!;
|
private Statistic<decimal> pp = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load(SoloStatisticsWatcher? soloStatisticsWatcher)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
AutoSizeAxes = Axes.X;
|
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))),
|
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()
|
protected override void LoadComplete()
|
||||||
|
@ -41,9 +41,6 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
public override bool? AllowGlobalTrackControl => true;
|
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>();
|
public readonly Bindable<ScoreInfo> SelectedScore = new Bindable<ScoreInfo>();
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
|
Loading…
Reference in New Issue
Block a user