mirror of https://github.com/ppy/osu
Apply NRT to all simple auxiliary skin classes
This commit is contained in:
parent
2017ac1135
commit
4352c56c3e
|
@ -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 JetBrains.Annotations;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
|
|
|
@ -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 osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
|
|
@ -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.Game.Graphics.Sprites;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
|
|
|
@ -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.Globalization;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
|
||||
|
|
|
@ -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.Threading.Tasks;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
|
@ -16,7 +14,7 @@ public sealed partial class LegacySpriteText : OsuSpriteText
|
|||
{
|
||||
private readonly LegacyFont font;
|
||||
|
||||
private LegacyGlyphStore glyphStore;
|
||||
private LegacyGlyphStore glyphStore = null!;
|
||||
|
||||
protected override char FixedWidthReferenceCharacter => '5';
|
||||
|
||||
|
@ -49,7 +47,7 @@ public LegacyGlyphStore(ISkin skin)
|
|||
this.skin = skin;
|
||||
}
|
||||
|
||||
public ITexturedCharacterGlyph Get(string fontName, char character)
|
||||
public ITexturedCharacterGlyph? Get(string fontName, char character)
|
||||
{
|
||||
string lookup = getLookupName(character);
|
||||
|
||||
|
@ -79,7 +77,7 @@ private static string getLookupName(char character)
|
|||
}
|
||||
}
|
||||
|
||||
public Task<ITexturedCharacterGlyph> GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character));
|
||||
public Task<ITexturedCharacterGlyph?> GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
{
|
||||
public class SkinCustomColourLookup
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
// 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;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
|
@ -39,13 +36,12 @@ public partial class SkinnableSound : SkinReloadableDrawable, IAdjustableAudioCo
|
|||
/// <summary>
|
||||
/// All raw <see cref="DrawableSamples"/>s contained in this <see cref="SkinnableSound"/>.
|
||||
/// </summary>
|
||||
[NotNull, ItemNotNull]
|
||||
protected IEnumerable<DrawableSample> DrawableSamples => samplesContainer.Select(c => c.Sample).Where(s => s != null);
|
||||
|
||||
private readonly AudioContainer<PoolableSkinnableSample> samplesContainer;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private IPooledSampleProvider samplePool { get; set; }
|
||||
[Resolved]
|
||||
private IPooledSampleProvider? samplePool { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="SkinnableSound"/>.
|
||||
|
@ -59,7 +55,7 @@ public SkinnableSound()
|
|||
/// Creates a new <see cref="SkinnableSound"/> with some initial samples.
|
||||
/// </summary>
|
||||
/// <param name="samples">The initial samples.</param>
|
||||
public SkinnableSound([NotNull] IEnumerable<ISampleInfo> samples)
|
||||
public SkinnableSound(IEnumerable<ISampleInfo> samples)
|
||||
: this()
|
||||
{
|
||||
this.samples = samples.ToArray();
|
||||
|
@ -69,7 +65,7 @@ public SkinnableSound([NotNull] IEnumerable<ISampleInfo> samples)
|
|||
/// Creates a new <see cref="SkinnableSound"/> with an initial sample.
|
||||
/// </summary>
|
||||
/// <param name="sample">The initial sample.</param>
|
||||
public SkinnableSound([NotNull] ISampleInfo sample)
|
||||
public SkinnableSound(ISampleInfo sample)
|
||||
: this(new[] { sample })
|
||||
{
|
||||
}
|
||||
|
@ -79,7 +75,7 @@ public SkinnableSound([NotNull] ISampleInfo sample)
|
|||
/// <summary>
|
||||
/// The samples that should be played.
|
||||
/// </summary>
|
||||
public ISampleInfo[] Samples
|
||||
public ISampleInfo[]? Samples
|
||||
{
|
||||
get => samples;
|
||||
set
|
||||
|
|
Loading…
Reference in New Issue