1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 03:42:57 +08:00

Apply NRT to results statistics displays

This commit is contained in:
Bartłomiej Dach 2024-05-14 13:17:31 +02:00
parent 414f023817
commit ee9144c3bd
No known key found for this signature in database
5 changed files with 7 additions and 17 deletions

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Graphics;
@ -22,7 +20,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
{
private readonly double accuracy;
private RollingCounter<double> counter;
private RollingCounter<double> counter = null!;
/// <summary>
/// Creates a new <see cref="AccuracyStatistic"/>.

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
@ -22,7 +20,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
{
private readonly bool isPerfect;
private Drawable perfectText;
private Drawable perfectText = null!;
/// <summary>
/// Creates a new <see cref="ComboStatistic"/>.

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Localisation;
@ -21,7 +19,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
private readonly int count;
private readonly int? maxCount;
private RollingCounter<int> counter;
private RollingCounter<int> counter = null!;
/// <summary>
/// Creates a new <see cref="CounterStatistic"/>.

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
@ -32,7 +30,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
private readonly CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
private RollingCounter<int> counter;
private RollingCounter<int> counter = null!;
public PerformanceStatistic(ScoreInfo score)
: base(BeatmapsetsStrings.ShowScoreboardHeaderspp)
@ -107,7 +105,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
protected override void Dispose(bool isDisposing)
{
cancellationTokenSource?.Cancel();
cancellationTokenSource.Cancel();
base.Dispose(isDisposing);
}

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Extensions.LocalisationExtensions;
@ -21,10 +19,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
/// </summary>
public abstract partial class StatisticDisplay : CompositeDrawable
{
protected SpriteText HeaderText { get; private set; }
protected SpriteText HeaderText { get; private set; } = null!;
private readonly LocalisableString header;
private Drawable content;
private Drawable content = null!;
/// <summary>
/// Creates a new <see cref="StatisticDisplay"/>.