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

rename and document virtual method

This commit is contained in:
Sheppsu 2024-12-10 23:26:12 -05:00
parent a441b6aeb0
commit 3358dcbea9
4 changed files with 10 additions and 5 deletions

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.UI
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(Player? player) private void load(Player? player)
{ {
if (player != null && player.ShowAnalysisSettings) if (player != null && player.UseAnalysisSettings)
{ {
ReplayAnalysisOverlay analysisOverlay; ReplayAnalysisOverlay analysisOverlay;
PlayfieldAdjustmentContainer.Add(analysisOverlay = new ReplayAnalysisOverlay(player.Score.Replay)); PlayfieldAdjustmentContainer.Add(analysisOverlay = new ReplayAnalysisOverlay(player.Score.Replay));

View File

@ -104,7 +104,12 @@ namespace osu.Game.Screens.Play
/// </summary> /// </summary>
public IBindable<bool> ShowingOverlayComponents = new Bindable<bool>(); public IBindable<bool> ShowingOverlayComponents = new Bindable<bool>();
public virtual bool ShowAnalysisSettings => false; /// <summary>
/// Whether to add <see cref="ReplayAnalysisSettings"/> to <see cref="PlayerSettingsOverlay"/>
/// and an indicator for implementations of <see cref="DrawableRuleset"/> to put an analysis overlay
/// on the player.
/// </summary>
public virtual bool UseAnalysisSettings => false;
// Should match PlayerLoader for consistency. Cached here for the rare case we push a Player // Should match PlayerLoader for consistency. Cached here for the rare case we push a Player
// without the loading screen (one such usage is the skin editor's scene library). // without the loading screen (one such usage is the skin editor's scene library).
@ -331,7 +336,7 @@ namespace osu.Game.Screens.Play
// we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there. // we may want to limit this in the future to disallow rulesets from outright replacing elements the user expects to be there.
failAnimationContainer.Add(createOverlayComponents(Beatmap.Value)); failAnimationContainer.Add(createOverlayComponents(Beatmap.Value));
if (ShowAnalysisSettings) if (UseAnalysisSettings)
addReplayAnalysisSettings(); addReplayAnalysisSettings();
if (!DrawableRuleset.AllowGameplayOverlays) if (!DrawableRuleset.AllowGameplayOverlays)

View File

@ -28,7 +28,7 @@ namespace osu.Game.Screens.Play
{ {
public const double BASE_SEEK_AMOUNT = 1000; public const double BASE_SEEK_AMOUNT = 1000;
public override bool ShowAnalysisSettings => true; public override bool UseAnalysisSettings => true;
private readonly Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore; private readonly Func<IBeatmap, IReadOnlyList<Mod>, Score> createScore;

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play
{ {
public abstract partial class SpectatorPlayer : Player public abstract partial class SpectatorPlayer : Player
{ {
public override bool ShowAnalysisSettings => true; public override bool UseAnalysisSettings => true;
[Resolved] [Resolved]
protected SpectatorClient SpectatorClient { get; private set; } = null!; protected SpectatorClient SpectatorClient { get; private set; } = null!;