Enable NRT in user profile overlay

This commit is contained in:
Bartłomiej Dach
2022-12-30 13:17:59 +01:00
parent b97d4b571e
commit 88e90d5fa0
55 changed files with 172 additions and 279 deletions

View File

@ -1,12 +1,10 @@
// 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.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
@ -34,10 +32,10 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
protected readonly SoloScoreInfo Score;
[Resolved]
private OsuColour colours { get; set; }
private OsuColour colours { get; set; } = null!;
[Resolved]
private OverlayColourProvider colourProvider { get; set; }
private OverlayColourProvider colourProvider { get; set; } = null!;
public DrawableProfileScore(SoloScoreInfo score)
{
@ -84,7 +82,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Spacing = new Vector2(0, 2),
Children = new Drawable[]
{
new ScoreBeatmapMetadataContainer(Score.Beatmap),
new ScoreBeatmapMetadataContainer(Score.Beatmap.AsNonNull()),
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
@ -94,7 +92,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
{
new OsuSpriteText
{
Text = $"{Score.Beatmap?.DifficultyName}",
Text = $"{Score.Beatmap.AsNonNull().DifficultyName}",
Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
Colour = colours.Yellow
},
@ -199,7 +197,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
});
}
[NotNull]
protected virtual Drawable CreateRightContent() => CreateDrawableAccuracy();
protected Drawable CreateDrawableAccuracy() => new Container