1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 06:22:56 +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]
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));

View File

@ -104,7 +104,12 @@ namespace osu.Game.Screens.Play
/// </summary>
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
// 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)

View File

@ -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<IBeatmap, IReadOnlyList<Mod>, Score> createScore;

View File

@ -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!;