From 3358dcbea9bc4f96b27b3f268175c76452392b9f Mon Sep 17 00:00:00 2001 From: Sheppsu <49356627+Sheppsu@users.noreply.github.com> Date: Tue, 10 Dec 2024 23:26:12 -0500 Subject: [PATCH] rename and document virtual method --- osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs | 2 +- osu.Game/Screens/Play/Player.cs | 9 +++++++-- osu.Game/Screens/Play/ReplayPlayer.cs | 2 +- osu.Game/Screens/Play/SpectatorPlayer.cs | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs b/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs index bc6749c8b2..ad63814f17 100644 --- a/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs +++ b/osu.Game.Rulesets.Osu/UI/DrawableOsuRuleset.cs @@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.UI [BackgroundDependencyLoader] private void load(Player? player) { - if (player != null && player.ShowAnalysisSettings) + if (player != null && player.UseAnalysisSettings) { ReplayAnalysisOverlay analysisOverlay; PlayfieldAdjustmentContainer.Add(analysisOverlay = new ReplayAnalysisOverlay(player.Score.Replay)); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index a4caa34598..6ff6fea08a 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -104,7 +104,12 @@ namespace osu.Game.Screens.Play /// public IBindable ShowingOverlayComponents = new Bindable(); - public virtual bool ShowAnalysisSettings => false; + /// + /// Whether to add to + /// and an indicator for implementations of to put an analysis overlay + /// on the player. + /// + public virtual bool UseAnalysisSettings => false; // 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). @@ -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. failAnimationContainer.Add(createOverlayComponents(Beatmap.Value)); - if (ShowAnalysisSettings) + if (UseAnalysisSettings) addReplayAnalysisSettings(); if (!DrawableRuleset.AllowGameplayOverlays) diff --git a/osu.Game/Screens/Play/ReplayPlayer.cs b/osu.Game/Screens/Play/ReplayPlayer.cs index 05f13949a9..27e248d535 100644 --- a/osu.Game/Screens/Play/ReplayPlayer.cs +++ b/osu.Game/Screens/Play/ReplayPlayer.cs @@ -28,7 +28,7 @@ namespace osu.Game.Screens.Play { public const double BASE_SEEK_AMOUNT = 1000; - public override bool ShowAnalysisSettings => true; + public override bool UseAnalysisSettings => true; private readonly Func, Score> createScore; diff --git a/osu.Game/Screens/Play/SpectatorPlayer.cs b/osu.Game/Screens/Play/SpectatorPlayer.cs index 8d7d7a0105..e197b1753a 100644 --- a/osu.Game/Screens/Play/SpectatorPlayer.cs +++ b/osu.Game/Screens/Play/SpectatorPlayer.cs @@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play { public abstract partial class SpectatorPlayer : Player { - public override bool ShowAnalysisSettings => true; + public override bool UseAnalysisSettings => true; [Resolved] protected SpectatorClient SpectatorClient { get; private set; } = null!;