diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index b276fb97f3..ffd1c2e4eb 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -4,3 +4,5 @@ ba1385330cc501f34937e08257e586c84e35d772 # Make everything partial 9bbc6a81a2b8f035e2b043d3718d2db6e4f1d868 +# Mass NRT enabling +75ed421f60228920abd819cebc5982cb7799bbbb diff --git a/SampleGame.iOS/Application.cs b/SampleGame.iOS/Application.cs index ae194d714a..c27e589f7a 100644 --- a/SampleGame.iOS/Application.cs +++ b/SampleGame.iOS/Application.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.iOS; namespace SampleGame.iOS diff --git a/osu.Framework.Benchmarks/BenchmarkTextBuilder.cs b/osu.Framework.Benchmarks/BenchmarkTextBuilder.cs index 9a3523f9b3..fb774e2960 100644 --- a/osu.Framework.Benchmarks/BenchmarkTextBuilder.cs +++ b/osu.Framework.Benchmarks/BenchmarkTextBuilder.cs @@ -51,7 +51,7 @@ private class TestStore : ITexturedGlyphLookupStore new CharacterGlyph(character, character, character, character, character, null), new DummyRenderer().CreateTexture(1, 1)); - public Task GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character)); + public Task GetAsync(string fontName, char character) => Task.Run(() => Get(fontName, character)); } } } diff --git a/osu.Framework.Tests.iOS/Application.cs b/osu.Framework.Tests.iOS/Application.cs index 7a6c8f4634..7305fe41e6 100644 --- a/osu.Framework.Tests.iOS/Application.cs +++ b/osu.Framework.Tests.iOS/Application.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.iOS; namespace osu.Framework.Tests diff --git a/osu.Framework.Tests/Audio/AudioCollectionManagerTest.cs b/osu.Framework.Tests/Audio/AudioCollectionManagerTest.cs index 53c39d7937..ca51933d8a 100644 --- a/osu.Framework.Tests/Audio/AudioCollectionManagerTest.cs +++ b/osu.Framework.Tests/Audio/AudioCollectionManagerTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Threading; using NUnit.Framework; using osu.Framework.Audio; diff --git a/osu.Framework.Tests/Audio/AudioComponentTest.cs b/osu.Framework.Tests/Audio/AudioComponentTest.cs index accb910b7e..22e8d1c3a3 100644 --- a/osu.Framework.Tests/Audio/AudioComponentTest.cs +++ b/osu.Framework.Tests/Audio/AudioComponentTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Audio.Sample; using osu.Framework.Audio.Track; diff --git a/osu.Framework.Tests/Audio/AudioManagerWithDeviceLoss.cs b/osu.Framework.Tests/Audio/AudioManagerWithDeviceLoss.cs index 924318008b..d1f5977b35 100644 --- a/osu.Framework.Tests/Audio/AudioManagerWithDeviceLoss.cs +++ b/osu.Framework.Tests/Audio/AudioManagerWithDeviceLoss.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Linq; using ManagedBass; diff --git a/osu.Framework.Tests/Audio/BassTestComponents.cs b/osu.Framework.Tests/Audio/BassTestComponents.cs index 2995e1cc96..e95713aaa5 100644 --- a/osu.Framework.Tests/Audio/BassTestComponents.cs +++ b/osu.Framework.Tests/Audio/BassTestComponents.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Threading; using ManagedBass; diff --git a/osu.Framework.Tests/Audio/DeviceLosingAudioTest.cs b/osu.Framework.Tests/Audio/DeviceLosingAudioTest.cs index 0a92aa35e2..cf2a00ee28 100644 --- a/osu.Framework.Tests/Audio/DeviceLosingAudioTest.cs +++ b/osu.Framework.Tests/Audio/DeviceLosingAudioTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; diff --git a/osu.Framework.Tests/Audio/DevicelessAudioTest.cs b/osu.Framework.Tests/Audio/DevicelessAudioTest.cs index 2d38c7d82c..2ca741bd55 100644 --- a/osu.Framework.Tests/Audio/DevicelessAudioTest.cs +++ b/osu.Framework.Tests/Audio/DevicelessAudioTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; namespace osu.Framework.Tests.Audio diff --git a/osu.Framework.Tests/Audio/TestAudioAdjustments.cs b/osu.Framework.Tests/Audio/TestAudioAdjustments.cs index 3506b811ab..8897f48e87 100644 --- a/osu.Framework.Tests/Audio/TestAudioAdjustments.cs +++ b/osu.Framework.Tests/Audio/TestAudioAdjustments.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.CompilerServices; using NUnit.Framework; diff --git a/osu.Framework.Tests/AutomatedVisualTestGame.cs b/osu.Framework.Tests/AutomatedVisualTestGame.cs index 647508cfed..a2d9986a69 100644 --- a/osu.Framework.Tests/AutomatedVisualTestGame.cs +++ b/osu.Framework.Tests/AutomatedVisualTestGame.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Testing; namespace osu.Framework.Tests diff --git a/osu.Framework.Tests/Bindables/BindableBoolTest.cs b/osu.Framework.Tests/Bindables/BindableBoolTest.cs index 3114ec9610..dc7677fd22 100644 --- a/osu.Framework.Tests/Bindables/BindableBoolTest.cs +++ b/osu.Framework.Tests/Bindables/BindableBoolTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableDoubleTest.cs b/osu.Framework.Tests/Bindables/BindableDoubleTest.cs index 506d0ef513..c6e8a8053f 100644 --- a/osu.Framework.Tests/Bindables/BindableDoubleTest.cs +++ b/osu.Framework.Tests/Bindables/BindableDoubleTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableEnumTest.cs b/osu.Framework.Tests/Bindables/BindableEnumTest.cs index 9890d028a8..e3781806c0 100644 --- a/osu.Framework.Tests/Bindables/BindableEnumTest.cs +++ b/osu.Framework.Tests/Bindables/BindableEnumTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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 NUnit.Framework; diff --git a/osu.Framework.Tests/Bindables/BindableFloatTest.cs b/osu.Framework.Tests/Bindables/BindableFloatTest.cs index 37c5e1421c..f671afcfe8 100644 --- a/osu.Framework.Tests/Bindables/BindableFloatTest.cs +++ b/osu.Framework.Tests/Bindables/BindableFloatTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableIntTest.cs b/osu.Framework.Tests/Bindables/BindableIntTest.cs index 328a9c4bac..7626da2ca1 100644 --- a/osu.Framework.Tests/Bindables/BindableIntTest.cs +++ b/osu.Framework.Tests/Bindables/BindableIntTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableLongTest.cs b/osu.Framework.Tests/Bindables/BindableLongTest.cs index 8da72a0939..5d92490a85 100644 --- a/osu.Framework.Tests/Bindables/BindableLongTest.cs +++ b/osu.Framework.Tests/Bindables/BindableLongTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableMarginPaddingTest.cs b/osu.Framework.Tests/Bindables/BindableMarginPaddingTest.cs index 391e6a42f0..fad7c26d6a 100644 --- a/osu.Framework.Tests/Bindables/BindableMarginPaddingTest.cs +++ b/osu.Framework.Tests/Bindables/BindableMarginPaddingTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Bindables/BindableSizeTest.cs b/osu.Framework.Tests/Bindables/BindableSizeTest.cs index 8721e4846a..d5e4c9c705 100644 --- a/osu.Framework.Tests/Bindables/BindableSizeTest.cs +++ b/osu.Framework.Tests/Bindables/BindableSizeTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using System.Drawing; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableStringTest.cs b/osu.Framework.Tests/Bindables/BindableStringTest.cs index 6419651c59..e2344ddaee 100644 --- a/osu.Framework.Tests/Bindables/BindableStringTest.cs +++ b/osu.Framework.Tests/Bindables/BindableStringTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Bindables/BindableWithCurrentTest.cs b/osu.Framework.Tests/Bindables/BindableWithCurrentTest.cs index 78ebfcce2e..dd21f9f4e3 100644 --- a/osu.Framework.Tests/Bindables/BindableWithCurrentTest.cs +++ b/osu.Framework.Tests/Bindables/BindableWithCurrentTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/Bindables/RangeConstrainedBindableTest.cs b/osu.Framework.Tests/Bindables/RangeConstrainedBindableTest.cs index 1c2f9f8750..750aa21a1c 100644 --- a/osu.Framework.Tests/Bindables/RangeConstrainedBindableTest.cs +++ b/osu.Framework.Tests/Bindables/RangeConstrainedBindableTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Configuration/FrameworkConfigManagerTest.cs b/osu.Framework.Tests/Configuration/FrameworkConfigManagerTest.cs index 52c7bbc0a0..0503b971c0 100644 --- a/osu.Framework.Tests/Configuration/FrameworkConfigManagerTest.cs +++ b/osu.Framework.Tests/Configuration/FrameworkConfigManagerTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 NUnit.Framework; diff --git a/osu.Framework.Tests/Extensions/TestExtensions.cs b/osu.Framework.Tests/Extensions/TestExtensions.cs index d260593100..14fe44adb6 100644 --- a/osu.Framework.Tests/Extensions/TestExtensions.cs +++ b/osu.Framework.Tests/Extensions/TestExtensions.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Extensions; diff --git a/osu.Framework.Tests/Extensions/TestStreamExtensions.cs b/osu.Framework.Tests/Extensions/TestStreamExtensions.cs index d7b3aa189d..d6c382462a 100644 --- a/osu.Framework.Tests/Extensions/TestStreamExtensions.cs +++ b/osu.Framework.Tests/Extensions/TestStreamExtensions.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.IO; using System.Linq; using System.Threading.Tasks; diff --git a/osu.Framework.Tests/Graphics/ColourTest.cs b/osu.Framework.Tests/Graphics/ColourTest.cs index a061871b54..5b2f814097 100644 --- a/osu.Framework.Tests/Graphics/ColourTest.cs +++ b/osu.Framework.Tests/Graphics/ColourTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Numerics; using NUnit.Framework; diff --git a/osu.Framework.Tests/Graphics/ShaderRegexTest.cs b/osu.Framework.Tests/Graphics/ShaderRegexTest.cs index 3db80b103d..296e57c148 100644 --- a/osu.Framework.Tests/Graphics/ShaderRegexTest.cs +++ b/osu.Framework.Tests/Graphics/ShaderRegexTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics.OpenGL.Shaders; diff --git a/osu.Framework.Tests/IO/TestDesktopStorage.cs b/osu.Framework.Tests/IO/TestDesktopStorage.cs index 5b7af44781..dd1ad403d8 100644 --- a/osu.Framework.Tests/IO/TestDesktopStorage.cs +++ b/osu.Framework.Tests/IO/TestDesktopStorage.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.IO; using NUnit.Framework; diff --git a/osu.Framework.Tests/IO/TestSortedListSerialization.cs b/osu.Framework.Tests/IO/TestSortedListSerialization.cs index 98d5f89417..c8585cacae 100644 --- a/osu.Framework.Tests/IO/TestSortedListSerialization.cs +++ b/osu.Framework.Tests/IO/TestSortedListSerialization.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Newtonsoft.Json; using NUnit.Framework; using osu.Framework.Lists; diff --git a/osu.Framework.Tests/Input/KeyCombinationModifierTest.cs b/osu.Framework.Tests/Input/KeyCombinationModifierTest.cs index 6ae0e5e311..06bf215f5a 100644 --- a/osu.Framework.Tests/Input/KeyCombinationModifierTest.cs +++ b/osu.Framework.Tests/Input/KeyCombinationModifierTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Input.Bindings; diff --git a/osu.Framework.Tests/Input/ReadableKeyCombinationTest.cs b/osu.Framework.Tests/Input/ReadableKeyCombinationTest.cs index a273b074db..857da947a0 100644 --- a/osu.Framework.Tests/Input/ReadableKeyCombinationTest.cs +++ b/osu.Framework.Tests/Input/ReadableKeyCombinationTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Input; using osu.Framework.Input.Bindings; diff --git a/osu.Framework.Tests/Lists/TestEnumerableExtensions.cs b/osu.Framework.Tests/Lists/TestEnumerableExtensions.cs index 4bd2ce0c61..83b0b437e1 100644 --- a/osu.Framework.Tests/Lists/TestEnumerableExtensions.cs +++ b/osu.Framework.Tests/Lists/TestEnumerableExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using NUnit.Framework; using osu.Framework.Extensions.IEnumerableExtensions; diff --git a/osu.Framework.Tests/Lists/TestWeakList.cs b/osu.Framework.Tests/Lists/TestWeakList.cs index 4777dee7a9..d002ba5af2 100644 --- a/osu.Framework.Tests/Lists/TestWeakList.cs +++ b/osu.Framework.Tests/Lists/TestWeakList.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework.Tests/Localisation/LocalisableDescriptionAttributeTest.cs b/osu.Framework.Tests/Localisation/LocalisableDescriptionAttributeTest.cs index 815661f23f..9fa0bf5c9f 100644 --- a/osu.Framework.Tests/Localisation/LocalisableDescriptionAttributeTest.cs +++ b/osu.Framework.Tests/Localisation/LocalisableDescriptionAttributeTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; using osu.Framework.Extensions; diff --git a/osu.Framework.Tests/MathUtils/TestInterpolation.cs b/osu.Framework.Tests/MathUtils/TestInterpolation.cs index 6f427293e4..054f1caaac 100644 --- a/osu.Framework.Tests/MathUtils/TestInterpolation.cs +++ b/osu.Framework.Tests/MathUtils/TestInterpolation.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework.Tests/MathUtils/TestPathApproximator.cs b/osu.Framework.Tests/MathUtils/TestPathApproximator.cs index b421d9dfcf..8bf2db49c9 100644 --- a/osu.Framework.Tests/MathUtils/TestPathApproximator.cs +++ b/osu.Framework.Tests/MathUtils/TestPathApproximator.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using NUnit.Framework; using osu.Framework.Utils; diff --git a/osu.Framework.Tests/Platform/PortableInstallationTest.cs b/osu.Framework.Tests/Platform/PortableInstallationTest.cs index 9c6d27294f..c2e0b9ca31 100644 --- a/osu.Framework.Tests/Platform/PortableInstallationTest.cs +++ b/osu.Framework.Tests/Platform/PortableInstallationTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Configuration; using osu.Framework.Platform; diff --git a/osu.Framework.Tests/Platform/UserInputManagerTest.cs b/osu.Framework.Tests/Platform/UserInputManagerTest.cs index 8da5f00b51..5537820256 100644 --- a/osu.Framework.Tests/Platform/UserInputManagerTest.cs +++ b/osu.Framework.Tests/Platform/UserInputManagerTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Testing; diff --git a/osu.Framework.Tests/Platform/UserStorageLookupTest.cs b/osu.Framework.Tests/Platform/UserStorageLookupTest.cs index 0ecf20ce2d..0b0923828c 100644 --- a/osu.Framework.Tests/Platform/UserStorageLookupTest.cs +++ b/osu.Framework.Tests/Platform/UserStorageLookupTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.IO; diff --git a/osu.Framework.Tests/Polygons/ConvexPolygonClipperFuzzingTest.cs b/osu.Framework.Tests/Polygons/ConvexPolygonClipperFuzzingTest.cs index b0f09b3352..7ad3234650 100644 --- a/osu.Framework.Tests/Polygons/ConvexPolygonClipperFuzzingTest.cs +++ b/osu.Framework.Tests/Polygons/ConvexPolygonClipperFuzzingTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework.Tests/Polygons/ConvexPolygonClippingTest.cs b/osu.Framework.Tests/Polygons/ConvexPolygonClippingTest.cs index 8ad7b8d3ea..24aefff5ee 100644 --- a/osu.Framework.Tests/Polygons/ConvexPolygonClippingTest.cs +++ b/osu.Framework.Tests/Polygons/ConvexPolygonClippingTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Polygons/LineIntersections.cs b/osu.Framework.Tests/Polygons/LineIntersections.cs index 025043fe22..bbfb460b24 100644 --- a/osu.Framework.Tests/Polygons/LineIntersections.cs +++ b/osu.Framework.Tests/Polygons/LineIntersections.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Primitives; diff --git a/osu.Framework.Tests/Primitives/QuadTest.cs b/osu.Framework.Tests/Primitives/QuadTest.cs index ffcd319d31..fed9176cdf 100644 --- a/osu.Framework.Tests/Primitives/QuadTest.cs +++ b/osu.Framework.Tests/Primitives/QuadTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections; using NUnit.Framework; using osu.Framework.Extensions.MatrixExtensions; diff --git a/osu.Framework.Tests/Primitives/TriangleTest.cs b/osu.Framework.Tests/Primitives/TriangleTest.cs index 1ac187efd3..91d66cfab4 100644 --- a/osu.Framework.Tests/Primitives/TriangleTest.cs +++ b/osu.Framework.Tests/Primitives/TriangleTest.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics.Primitives; using osuTK; diff --git a/osu.Framework.Tests/Primitives/Vector2ExtensionsTest.cs b/osu.Framework.Tests/Primitives/Vector2ExtensionsTest.cs index 81a4737926..5c07427fb9 100644 --- a/osu.Framework.Tests/Primitives/Vector2ExtensionsTest.cs +++ b/osu.Framework.Tests/Primitives/Vector2ExtensionsTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/TestGame.cs b/osu.Framework.Tests/TestGame.cs index 7812aa2103..97b71a41a0 100644 --- a/osu.Framework.Tests/TestGame.cs +++ b/osu.Framework.Tests/TestGame.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Bindables; using osu.Framework.IO.Stores; diff --git a/osu.Framework.Tests/Transforms/TestSceneTransformEventBindings.cs b/osu.Framework.Tests/Transforms/TestSceneTransformEventBindings.cs index 4ee2f9b400..9b45932c7a 100644 --- a/osu.Framework.Tests/Transforms/TestSceneTransformEventBindings.cs +++ b/osu.Framework.Tests/Transforms/TestSceneTransformEventBindings.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Audio/TestSceneAudioMixer.cs b/osu.Framework.Tests/Visual/Audio/TestSceneAudioMixer.cs index 2cf36c59dc..92097e58c3 100644 --- a/osu.Framework.Tests/Visual/Audio/TestSceneAudioMixer.cs +++ b/osu.Framework.Tests/Visual/Audio/TestSceneAudioMixer.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using ManagedBass; using ManagedBass.Fx; diff --git a/osu.Framework.Tests/Visual/Audio/TestSceneTrackAdjustments.cs b/osu.Framework.Tests/Visual/Audio/TestSceneTrackAdjustments.cs index 96946b83a5..5a2e57099f 100644 --- a/osu.Framework.Tests/Visual/Audio/TestSceneTrackAdjustments.cs +++ b/osu.Framework.Tests/Visual/Audio/TestSceneTrackAdjustments.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Audio.Track; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Visual/Bindables/TestSceneBindableNumbers.cs b/osu.Framework.Tests/Visual/Bindables/TestSceneBindableNumbers.cs index 6640b8db9b..c2542cfdca 100644 --- a/osu.Framework.Tests/Visual/Bindables/TestSceneBindableNumbers.cs +++ b/osu.Framework.Tests/Visual/Bindables/TestSceneBindableNumbers.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Globalization; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneBufferedContainer.cs b/osu.Framework.Tests/Visual/Containers/TestSceneBufferedContainer.cs index 68c7aa6631..aadd9b4a9d 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneBufferedContainer.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneBufferedContainer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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 osuTK; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneCachedBufferedContainer.cs b/osu.Framework.Tests/Visual/Containers/TestSceneCachedBufferedContainer.cs index 3922a393e0..dd91b4861c 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneCachedBufferedContainer.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneCachedBufferedContainer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneCoordinateSpaces.cs b/osu.Framework.Tests/Visual/Containers/TestSceneCoordinateSpaces.cs index d64c7db181..19ea50ee25 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneCoordinateSpaces.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneCoordinateSpaces.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Globalization; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneDynamicDepth.cs b/osu.Framework.Tests/Visual/Containers/TestSceneDynamicDepth.cs index 30404591dd..b73d2415ec 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneDynamicDepth.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneDynamicDepth.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackBufferedContainer.cs b/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackBufferedContainer.cs index 4388fd54dd..938bcbfd7c 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackBufferedContainer.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackBufferedContainer.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackTriangle.cs b/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackTriangle.cs index 1b38663d19..d76214e925 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackTriangle.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneFrontToBackTriangle.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Shapes; using osuTK; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneMasking.cs b/osu.Framework.Tests/Visual/Containers/TestSceneMasking.cs index 7bb1dc00cb..6a450848d9 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneMasking.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneMasking.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Containers/TestScenePadding.cs b/osu.Framework.Tests/Visual/Containers/TestScenePadding.cs index 7f5cde9c70..f5ea78f80e 100644 --- a/osu.Framework.Tests/Visual/Containers/TestScenePadding.cs +++ b/osu.Framework.Tests/Visual/Containers/TestScenePadding.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaContainer.cs b/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaContainer.cs index 1b16622d40..10a8c93f86 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaContainer.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaContainer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using osu.Framework.Bindables; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaOverrides.cs b/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaOverrides.cs index a1cf4ef3ec..2c77397310 100644 --- a/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaOverrides.cs +++ b/osu.Framework.Tests/Visual/Containers/TestSceneSafeAreaOverrides.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.EnumExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneBorderSmoothing.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneBorderSmoothing.cs index da44dd0e91..b4fb91b750 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneBorderSmoothing.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneBorderSmoothing.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneColourGradient.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneColourGradient.cs index f9d09f0fdb..cd774462ec 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneColourGradient.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneColourGradient.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneComplexBlending.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneComplexBlending.cs index 7d12625275..883c59538c 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneComplexBlending.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneComplexBlending.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneEffects.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneEffects.cs index 59c0d64990..25faa073f3 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneEffects.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneEffects.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Colour; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneHollowEdgeEffect.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneHollowEdgeEffect.cs index 81d152fe09..e9577c0b54 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneHollowEdgeEffect.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneHollowEdgeEffect.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Effects; diff --git a/osu.Framework.Tests/Visual/Drawables/TestScenePathApproximator.cs b/osu.Framework.Tests/Visual/Drawables/TestScenePathApproximator.cs index fd7c6cb0ac..f473b6903b 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestScenePathApproximator.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestScenePathApproximator.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Drawables/TestScenePropertyBoundaries.cs b/osu.Framework.Tests/Visual/Drawables/TestScenePropertyBoundaries.cs index 8729bc1136..60fb3d048b 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestScenePropertyBoundaries.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestScenePropertyBoundaries.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneProxyDrawables.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneProxyDrawables.cs index 34b760bbfd..63cc7bd619 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneProxyDrawables.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneProxyDrawables.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Containers; diff --git a/osu.Framework.Tests/Visual/Drawables/TestSceneTransformSequence.cs b/osu.Framework.Tests/Visual/Drawables/TestSceneTransformSequence.cs index 6f58ab3535..b35689256f 100644 --- a/osu.Framework.Tests/Visual/Drawables/TestSceneTransformSequence.cs +++ b/osu.Framework.Tests/Visual/Drawables/TestSceneTransformSequence.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/FrameworkGridTestScene.cs b/osu.Framework.Tests/Visual/FrameworkGridTestScene.cs index 5eb14bf870..18ada1f3b4 100644 --- a/osu.Framework.Tests/Visual/FrameworkGridTestScene.cs +++ b/osu.Framework.Tests/Visual/FrameworkGridTestScene.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Testing; namespace osu.Framework.Tests.Visual diff --git a/osu.Framework.Tests/Visual/FrameworkTestScene.cs b/osu.Framework.Tests/Visual/FrameworkTestScene.cs index 954e1c4293..9746482f63 100644 --- a/osu.Framework.Tests/Visual/FrameworkTestScene.cs +++ b/osu.Framework.Tests/Visual/FrameworkTestScene.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Testing; namespace osu.Framework.Tests.Visual diff --git a/osu.Framework.Tests/Visual/FrameworkTestSceneTestRunner.cs b/osu.Framework.Tests/Visual/FrameworkTestSceneTestRunner.cs index a44800b045..860da49458 100644 --- a/osu.Framework.Tests/Visual/FrameworkTestSceneTestRunner.cs +++ b/osu.Framework.Tests/Visual/FrameworkTestSceneTestRunner.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.IO.Stores; using osu.Framework.Testing; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneHandleInput.cs b/osu.Framework.Tests/Visual/Input/TestSceneHandleInput.cs index 425b3d25a2..86b48b3217 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneHandleInput.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneHandleInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Containers; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneInputQueueChange.cs b/osu.Framework.Tests/Visual/Input/TestSceneInputQueueChange.cs index 57fe3aa135..8e4862ff07 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneInputQueueChange.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneInputQueueChange.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using NUnit.Framework; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneJoystick.cs b/osu.Framework.Tests/Visual/Input/TestSceneJoystick.cs index bd9909eb36..d1d2b206d3 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneJoystick.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneJoystick.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneKeyBindingsGrid.cs b/osu.Framework.Tests/Visual/Input/TestSceneKeyBindingsGrid.cs index c6edaae497..08b3dacdf0 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneKeyBindingsGrid.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneKeyBindingsGrid.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Diagnostics; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneMidi.cs b/osu.Framework.Tests/Visual/Input/TestSceneMidi.cs index 490d5e10be..7b236b0c78 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneMidi.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneMidi.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -36,7 +34,7 @@ public TestSceneMidi() } [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; protected override void LoadComplete() { diff --git a/osu.Framework.Tests/Visual/Input/TestSceneNestedHover.cs b/osu.Framework.Tests/Visual/Input/TestSceneNestedHover.cs index a8f3ef6c57..b5a527aa5b 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneNestedHover.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneNestedHover.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneReadableKeyCombinationProvider.cs b/osu.Framework.Tests/Visual/Input/TestSceneReadableKeyCombinationProvider.cs index 589e5370b1..89df608755 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneReadableKeyCombinationProvider.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneReadableKeyCombinationProvider.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Containers; @@ -104,7 +102,7 @@ protected override void LoadComplete() public partial class Key : CompositeDrawable { [Resolved] - private ReadableKeyCombinationProvider readableKeyCombinationProvider { get; set; } + private ReadableKeyCombinationProvider readableKeyCombinationProvider { get; set; } = null!; private readonly Box box; private readonly SpriteText text; @@ -177,7 +175,7 @@ protected override void Dispose(bool isDisposing) public partial class PressedKeyCombinationDisplay : CompositeDrawable { [Resolved] - private ReadableKeyCombinationProvider readableKeyCombinationProvider { get; set; } + private ReadableKeyCombinationProvider readableKeyCombinationProvider { get; set; } = null!; private readonly SpriteText text; diff --git a/osu.Framework.Tests/Visual/Input/TestSceneTabletInput.cs b/osu.Framework.Tests/Visual/Input/TestSceneTabletInput.cs index cc88b39016..96cc0c8536 100644 --- a/osu.Framework.Tests/Visual/Input/TestSceneTabletInput.cs +++ b/osu.Framework.Tests/Visual/Input/TestSceneTabletInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -49,7 +47,7 @@ public TestSceneTabletInput() } [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; protected override void LoadComplete() { diff --git a/osu.Framework.Tests/Visual/Platform/TestSceneAllowSuspension.cs b/osu.Framework.Tests/Visual/Platform/TestSceneAllowSuspension.cs index 8ac0b4b19f..2cd1f8266a 100644 --- a/osu.Framework.Tests/Visual/Platform/TestSceneAllowSuspension.cs +++ b/osu.Framework.Tests/Visual/Platform/TestSceneAllowSuspension.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Bindables; diff --git a/osu.Framework.Tests/Visual/Platform/TestSceneExternalLinks.cs b/osu.Framework.Tests/Visual/Platform/TestSceneExternalLinks.cs index 86d82269ba..646878ba3b 100644 --- a/osu.Framework.Tests/Visual/Platform/TestSceneExternalLinks.cs +++ b/osu.Framework.Tests/Visual/Platform/TestSceneExternalLinks.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Containers; @@ -15,7 +13,7 @@ namespace osu.Framework.Tests.Visual.Platform public partial class TestSceneExternalLinks : FrameworkTestScene { [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; public TestSceneExternalLinks() { diff --git a/osu.Framework.Tests/Visual/Platform/TestScenePresentFileExternally.cs b/osu.Framework.Tests/Visual/Platform/TestScenePresentFileExternally.cs index 390ba2c4fe..2fa1f4427b 100644 --- a/osu.Framework.Tests/Visual/Platform/TestScenePresentFileExternally.cs +++ b/osu.Framework.Tests/Visual/Platform/TestScenePresentFileExternally.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -17,10 +15,10 @@ namespace osu.Framework.Tests.Visual.Platform public partial class TestScenePresentFileExternally : FrameworkTestScene { [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; [Resolved] - private Storage storage { get; set; } + private Storage storage { get; set; } = null!; protected override void LoadComplete() { diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneAnimationLayout.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneAnimationLayout.cs index ec909edc93..4c95e5b370 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneAnimationLayout.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneAnimationLayout.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Extensions.ObjectExtensions; @@ -126,7 +124,7 @@ public TestDrawableAnimation(Axes contentRelativeAxes = Axes.None) private partial class TestTextureAnimation : TextureAnimation { [Resolved] - private FontStore fontStore { get; set; } + private FontStore fontStore { get; set; } = null!; public TestTextureAnimation() { diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneBufferedContainerView.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneBufferedContainerView.cs index c432bff6a7..c32838546d 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneBufferedContainerView.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneBufferedContainerView.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneRomanisableSpriteText.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneRomanisableSpriteText.cs index b2bcde4689..83cfae4ef5 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneRomanisableSpriteText.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneRomanisableSpriteText.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using NUnit.Framework; using osu.Framework.Allocation; @@ -44,7 +42,7 @@ public TestSceneRomanisableSpriteText() } [Resolved] - private FrameworkConfigManager config { get; set; } + private FrameworkConfigManager config { get; set; } = null!; [Test] public void TestToggleRomanisedState() diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneSmoothedEdges.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneSmoothedEdges.cs index dddbe5c60d..b65f111fe4 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneSmoothedEdges.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneSmoothedEdges.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Shapes; using osu.Framework.Graphics.Sprites; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteText.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteText.cs index 0813c35622..d6e8b9105a 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteText.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteText.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteTextTruncate.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteTextTruncate.cs index e229ca78dd..fe0ba5306c 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteTextTruncate.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneSpriteTextTruncate.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneTextFlow.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneTextFlow.cs index 10f56de936..fcd54e7620 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneTextFlow.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneTextFlow.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneTexturedTriangle.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneTexturedTriangle.cs index ee2e9e5e7f..a10dbdb527 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneTexturedTriangle.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneTexturedTriangle.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneTriangles.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneTriangles.cs index b64e9d16e3..beb9ebd478 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneTriangles.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneTriangles.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics.Shapes; diff --git a/osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs b/osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs index 7e2fccf82f..594302631a 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestSceneVideoLayout.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/Sprites/TestVideo.cs b/osu.Framework.Tests/Visual/Sprites/TestVideo.cs index 7806fe97e4..76424a1d67 100644 --- a/osu.Framework.Tests/Visual/Sprites/TestVideo.cs +++ b/osu.Framework.Tests/Visual/Sprites/TestVideo.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.IO; using osu.Framework.Graphics; using osu.Framework.Graphics.Video; diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethods.cs b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethods.cs index 641c3ae7bb..ae7815cbfa 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethods.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethods.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Tests.Visual.Testing { public partial class TestSceneDerivedTestWithDerivedMethods : TestSceneTest diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethodsWithAttributes.cs b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethodsWithAttributes.cs index 5c605597b4..a1ab33fe74 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethodsWithAttributes.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedMethodsWithAttributes.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Testing; diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedSource.cs b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedSource.cs index 1aacc3220d..feeefa0f6d 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedSource.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneDerivedTestWithDerivedSource.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; namespace osu.Framework.Tests.Visual.Testing diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs b/osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs index a0663dc2ac..2a82cf93ec 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Visualisation; diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneIgnore.cs b/osu.Framework.Tests/Visual/Testing/TestSceneIgnore.cs index 4ee9e3d51e..e9336eae72 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneIgnore.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneIgnore.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; namespace osu.Framework.Tests.Visual.Testing diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs b/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs index 98ccbc625e..5c37636140 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneTest.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using NUnit.Framework; using osu.Framework.Development; diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithExternalSource.cs b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithExternalSource.cs index 5541c759c4..ea618b66ca 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithExternalSource.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithExternalSource.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; namespace osu.Framework.Tests.Visual.Testing diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithSource.cs b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithSource.cs index bc11c14add..321bd440c5 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithSource.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithSource.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections; using NUnit.Framework; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithValues.cs b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithValues.cs index 11ef742380..b698139eb4 100644 --- a/osu.Framework.Tests/Visual/Testing/TestSceneTestWithValues.cs +++ b/osu.Framework.Tests/Visual/Testing/TestSceneTestWithValues.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Tests.Bindables; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneButton.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneButton.cs index 7d78329271..9c50a7ec67 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneButton.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneButton.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneCheckboxes.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneCheckboxes.cs index 9455d86f62..5ce7f95f3b 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneCheckboxes.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneCheckboxes.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneDirectorySelector.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneDirectorySelector.cs index 6c2f6c5b46..ef3a4635f7 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneDirectorySelector.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneDirectorySelector.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneFileSelector.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneFileSelector.cs index 0daf2a7cdd..3d346421df 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneFileSelector.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneFileSelector.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestScenePopover.cs b/osu.Framework.Tests/Visual/UserInterface/TestScenePopover.cs index 8aed390402..98654e6e9b 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestScenePopover.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestScenePopover.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using NUnit.Framework; using osu.Framework.Graphics; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneRigidBody.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneRigidBody.cs index 454ff60b77..0ff226ce74 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneRigidBody.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneRigidBody.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; @@ -27,9 +25,6 @@ private float restitution { restitutionBacking = value; - if (sim == null) - return; - foreach (var d in sim.Children) d.Restitution = value; sim.Restitution = value; @@ -45,9 +40,6 @@ private float friction { frictionBacking = value; - if (sim == null) - return; - foreach (var d in sim.Children) d.FrictionCoefficient = value; sim.FrictionCoefficient = value; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs index 7fc25442f6..7474f18455 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneScreenStack.cs @@ -1099,7 +1099,7 @@ public override void OnEntering(ScreenTransitionEvent e) if (shouldTakeOutLease) { - DummyBindable.BindTo(((TestScreen)e.Last).DummyBindable); + DummyBindable.BindTo(((TestScreen)e.Last!).DummyBindable); LeasedCopy = DummyBindable.BeginLease(true); } diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneUnclosableMenu.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneUnclosableMenu.cs index b1885a9e61..efba859a3f 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneUnclosableMenu.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneUnclosableMenu.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/Visual/UserInterface/TestUIComponentsWithCurrent.cs b/osu.Framework.Tests/Visual/UserInterface/TestUIComponentsWithCurrent.cs index fd5a744fae..755f84d4e4 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestUIComponentsWithCurrent.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestUIComponentsWithCurrent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Bindables; using osu.Framework.Graphics.UserInterface; diff --git a/osu.Framework.Tests/VisualTestGame.cs b/osu.Framework.Tests/VisualTestGame.cs index a4b36b85b5..1a55147ab3 100644 --- a/osu.Framework.Tests/VisualTestGame.cs +++ b/osu.Framework.Tests/VisualTestGame.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Cursor; diff --git a/osu.Framework.iOS/Graphics/Textures/IOSTextureLoaderStore.cs b/osu.Framework.iOS/Graphics/Textures/IOSTextureLoaderStore.cs index 23846eeed1..def073c20a 100644 --- a/osu.Framework.iOS/Graphics/Textures/IOSTextureLoaderStore.cs +++ b/osu.Framework.iOS/Graphics/Textures/IOSTextureLoaderStore.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.IO; using CoreGraphics; @@ -23,22 +21,28 @@ public IOSTextureLoaderStore(IResourceStore store) protected override Image ImageFromStream(Stream stream) { - using (var uiImage = UIImage.LoadFromData(NSData.FromStream(stream))) + using (var nativeData = NSData.FromStream(stream)) { - if (uiImage == null) throw new ArgumentException($"{nameof(Image)} could not be created from {nameof(stream)}."); + if (nativeData == null) + throw new ArgumentException($"{nameof(Image)} could not be created from {nameof(stream)}."); + + using (var uiImage = UIImage.LoadFromData(nativeData)) + { + if (uiImage == null) throw new ArgumentException($"{nameof(Image)} could not be created from {nameof(stream)}."); - int width = (int)uiImage.Size.Width; - int height = (int)uiImage.Size.Height; + int width = (int)uiImage.Size.Width; + int height = (int)uiImage.Size.Height; - // TODO: Use pool/memory when builds success with Xamarin. - // Probably at .NET Core 3.1 time frame. - byte[] data = new byte[width * height * 4]; - using (CGBitmapContext textureContext = new CGBitmapContext(data, width, height, 8, width * 4, CGColorSpace.CreateDeviceRGB(), CGImageAlphaInfo.PremultipliedLast)) - textureContext.DrawImage(new CGRect(0, 0, width, height), uiImage.CGImage); + // TODO: Use pool/memory when builds success with Xamarin. + // Probably at .NET Core 3.1 time frame. + byte[] data = new byte[width * height * 4]; + using (CGBitmapContext textureContext = new CGBitmapContext(data, width, height, 8, width * 4, CGColorSpace.CreateDeviceRGB(), CGImageAlphaInfo.PremultipliedLast)) + textureContext.DrawImage(new CGRect(0, 0, width, height), uiImage.CGImage); - var image = Image.LoadPixelData(data, width, height); + var image = Image.LoadPixelData(data, width, height); - return image; + return image; + } } } } diff --git a/osu.Framework.iOS/Graphics/Video/IOSVideoDecoder.cs b/osu.Framework.iOS/Graphics/Video/IOSVideoDecoder.cs index b615173431..6870fecac7 100644 --- a/osu.Framework.iOS/Graphics/Video/IOSVideoDecoder.cs +++ b/osu.Framework.iOS/Graphics/Video/IOSVideoDecoder.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.IO; using System.Runtime.InteropServices; using FFmpeg.AutoGen; diff --git a/osu.Framework.iOS/IOSStorage.cs b/osu.Framework.iOS/IOSStorage.cs index 350b99281b..980fe51eb9 100644 --- a/osu.Framework.iOS/IOSStorage.cs +++ b/osu.Framework.iOS/IOSStorage.cs @@ -1,4 +1,4 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable diff --git a/osu.Framework.iOS/Properties/AssemblyInfo.cs b/osu.Framework.iOS/Properties/AssemblyInfo.cs index 9f6deaa30b..85d8e9bbd3 100644 --- a/osu.Framework.iOS/Properties/AssemblyInfo.cs +++ b/osu.Framework.iOS/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Runtime.CompilerServices; using ObjCRuntime; diff --git a/osu.Framework/Bindables/BindableDouble.cs b/osu.Framework/Bindables/BindableDouble.cs index f8fccb73f3..00e893b07f 100644 --- a/osu.Framework/Bindables/BindableDouble.cs +++ b/osu.Framework/Bindables/BindableDouble.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Bindables @@ -14,7 +12,7 @@ public BindableDouble(double defaultValue = 0) { } - public override string ToString(string format, IFormatProvider formatProvider) => base.ToString(format ?? "0.0###", formatProvider); + public override string ToString(string? format, IFormatProvider formatProvider) => base.ToString(format ?? "0.0###", formatProvider); protected override Bindable CreateInstance() => new BindableDouble(); } diff --git a/osu.Framework/Bindables/BindableFloat.cs b/osu.Framework/Bindables/BindableFloat.cs index 78538dae2c..e142feb280 100644 --- a/osu.Framework/Bindables/BindableFloat.cs +++ b/osu.Framework/Bindables/BindableFloat.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Bindables @@ -14,7 +12,7 @@ public BindableFloat(float defaultValue = 0) { } - public override string ToString(string format, IFormatProvider formatProvider) => base.ToString(format ?? "0.0###", formatProvider); + public override string ToString(string? format, IFormatProvider formatProvider) => base.ToString(format ?? "0.0###", formatProvider); protected override Bindable CreateInstance() => new BindableFloat(); } diff --git a/osu.Framework/Development/DebugUtils.cs b/osu.Framework/Development/DebugUtils.cs index fe245a6bfd..450a0f2f53 100644 --- a/osu.Framework/Development/DebugUtils.cs +++ b/osu.Framework/Development/DebugUtils.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Diagnostics; using System.Linq; @@ -57,7 +55,7 @@ public static class DebugUtils public static bool LogPerformanceIssues { get; internal set; } // https://stackoverflow.com/a/2186634 - private static bool isDebugAssembly(Assembly assembly) => assembly?.GetCustomAttributes(false).OfType().Any(da => da.IsJITTrackingEnabled) ?? false; + private static bool isDebugAssembly(Assembly? assembly) => assembly?.GetCustomAttributes(false).OfType().Any(da => da.IsJITTrackingEnabled) ?? false; /// /// Gets the entry assembly, or calling assembly otherwise. diff --git a/osu.Framework/Graphics/Containers/LifetimeManagementContainer.cs b/osu.Framework/Graphics/Containers/LifetimeManagementContainer.cs index d4fce045ab..4b5516d1bd 100644 --- a/osu.Framework/Graphics/Containers/LifetimeManagementContainer.cs +++ b/osu.Framework/Graphics/Containers/LifetimeManagementContainer.cs @@ -1,11 +1,10 @@ // Copyright (c) ppy Pty Ltd . 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.Diagnostics; +using osu.Framework.Extensions.ObjectExtensions; using osu.Framework.Graphics.Performance; namespace osu.Framework.Graphics.Containers @@ -138,7 +137,7 @@ private void drawableLifetimeChanged(Drawable drawable) public void Dispose() { - if (Drawable != null) + if (Drawable.IsNotNull()) Drawable.LifetimeChanged -= drawableLifetimeChanged; } } diff --git a/osu.Framework/Graphics/Containers/Markdown/MarkdownFencedCodeBlock.cs b/osu.Framework/Graphics/Containers/Markdown/MarkdownFencedCodeBlock.cs index c12a411fb2..4d8b1d7b46 100644 --- a/osu.Framework/Graphics/Containers/Markdown/MarkdownFencedCodeBlock.cs +++ b/osu.Framework/Graphics/Containers/Markdown/MarkdownFencedCodeBlock.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Markdig.Syntax; using osu.Framework.Allocation; using osu.Framework.Graphics.Shapes; @@ -23,7 +21,7 @@ public partial class MarkdownFencedCodeBlock : CompositeDrawable, IMarkdownTextF private readonly FencedCodeBlock fencedCodeBlock; [Resolved] - private IMarkdownTextFlowComponent parentFlowComponent { get; set; } + private IMarkdownTextFlowComponent parentFlowComponent { get; set; } = null!; public MarkdownFencedCodeBlock(FencedCodeBlock fencedCodeBlock) { diff --git a/osu.Framework/Graphics/Containers/Markdown/MarkdownLinkText.cs b/osu.Framework/Graphics/Containers/Markdown/MarkdownLinkText.cs index eb74a7d4ef..5845fb4c1b 100644 --- a/osu.Framework/Graphics/Containers/Markdown/MarkdownLinkText.cs +++ b/osu.Framework/Graphics/Containers/Markdown/MarkdownLinkText.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Markdig.Syntax.Inlines; using osu.Framework.Allocation; using osu.Framework.Graphics.Cursor; @@ -24,10 +22,10 @@ public partial class MarkdownLinkText : CompositeDrawable, IHasTooltip, IMarkdow public LocalisableString TooltipText => Url; [Resolved] - private IMarkdownTextComponent parentTextComponent { get; set; } + private IMarkdownTextComponent parentTextComponent { get; set; } = null!; [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; private readonly string text; diff --git a/osu.Framework/Graphics/Containers/Markdown/MarkdownParagraph.cs b/osu.Framework/Graphics/Containers/Markdown/MarkdownParagraph.cs index 83863eaae7..5a4e9701e7 100644 --- a/osu.Framework/Graphics/Containers/Markdown/MarkdownParagraph.cs +++ b/osu.Framework/Graphics/Containers/Markdown/MarkdownParagraph.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Markdig.Syntax; using osu.Framework.Allocation; @@ -16,7 +14,7 @@ public partial class MarkdownParagraph : CompositeDrawable, IMarkdownTextFlowCom private readonly ParagraphBlock paragraphBlock; [Resolved] - private IMarkdownTextFlowComponent parentFlowComponent { get; set; } + private IMarkdownTextFlowComponent parentFlowComponent { get; set; } = null!; public MarkdownParagraph(ParagraphBlock paragraphBlock) { diff --git a/osu.Framework/Graphics/Containers/Markdown/MarkdownQuoteBlock.cs b/osu.Framework/Graphics/Containers/Markdown/MarkdownQuoteBlock.cs index 340a6db6c1..094c745a58 100644 --- a/osu.Framework/Graphics/Containers/Markdown/MarkdownQuoteBlock.cs +++ b/osu.Framework/Graphics/Containers/Markdown/MarkdownQuoteBlock.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Markdig.Syntax; using osu.Framework.Allocation; using osu.Framework.Graphics.Shapes; @@ -21,7 +19,7 @@ public partial class MarkdownQuoteBlock : CompositeDrawable, IMarkdownTextFlowCo private readonly QuoteBlock quoteBlock; [Resolved] - private IMarkdownTextFlowComponent parentFlowComponent { get; set; } + private IMarkdownTextFlowComponent parentFlowComponent { get; set; } = null!; public MarkdownQuoteBlock(QuoteBlock quoteBlock) { diff --git a/osu.Framework/Graphics/Containers/Markdown/NotImplementedMarkdown.cs b/osu.Framework/Graphics/Containers/Markdown/NotImplementedMarkdown.cs index 22a7c5eca0..022cd183ef 100644 --- a/osu.Framework/Graphics/Containers/Markdown/NotImplementedMarkdown.cs +++ b/osu.Framework/Graphics/Containers/Markdown/NotImplementedMarkdown.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Markdig.Syntax; using osu.Framework.Allocation; using osu.Framework.Graphics.Sprites; @@ -18,7 +16,7 @@ public partial class NotImplementedMarkdown : CompositeDrawable, IMarkdownTextCo private readonly IMarkdownObject markdownObject; [Resolved] - private IMarkdownTextComponent parentTextComponent { get; set; } + private IMarkdownTextComponent parentTextComponent { get; set; } = null!; public NotImplementedMarkdown(IMarkdownObject markdownObject) { @@ -38,7 +36,7 @@ public SpriteText CreateSpriteText() var text = parentTextComponent.CreateSpriteText(); text.Colour = new Color4(255, 0, 0, 255); text.Font = text.Font.With(size: 21); - text.Text = markdownObject?.GetType() + " Not implemented."; + text.Text = markdownObject.GetType() + " Not implemented."; return text; } } diff --git a/osu.Framework/Graphics/Lines/SmoothPath.cs b/osu.Framework/Graphics/Lines/SmoothPath.cs index f7ffa51fa7..afdaac5039 100644 --- a/osu.Framework/Graphics/Lines/SmoothPath.cs +++ b/osu.Framework/Graphics/Lines/SmoothPath.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Caching; @@ -18,7 +16,7 @@ namespace osu.Framework.Graphics.Lines public partial class SmoothPath : Path { [Resolved] - private IRenderer renderer { get; set; } + private IRenderer renderer { get; set; } = null!; [BackgroundDependencyLoader] private void load() diff --git a/osu.Framework/Graphics/Sprites/IHasText.cs b/osu.Framework/Graphics/Sprites/IHasText.cs index b78aeb4c22..f5a82b4f5a 100644 --- a/osu.Framework/Graphics/Sprites/IHasText.cs +++ b/osu.Framework/Graphics/Sprites/IHasText.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Localisation; namespace osu.Framework.Graphics.Sprites diff --git a/osu.Framework/Graphics/Sprites/SpriteText_DrawNode.cs b/osu.Framework/Graphics/Sprites/SpriteText_DrawNode.cs index 5b08325a36..1192d4f9ea 100644 --- a/osu.Framework/Graphics/Sprites/SpriteText_DrawNode.cs +++ b/osu.Framework/Graphics/Sprites/SpriteText_DrawNode.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 osu.Framework.Graphics.Colour; diff --git a/osu.Framework/Graphics/Textures/ITextureUpload.cs b/osu.Framework/Graphics/Textures/ITextureUpload.cs index 01dba8abf1..2f78284710 100644 --- a/osu.Framework/Graphics/Textures/ITextureUpload.cs +++ b/osu.Framework/Graphics/Textures/ITextureUpload.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics.Primitives; using osuTK.Graphics.ES30; diff --git a/osu.Framework/Graphics/TransformSequenceExtensions.cs b/osu.Framework/Graphics/TransformSequenceExtensions.cs index e6ac365c6e..cb8d6d726d 100644 --- a/osu.Framework/Graphics/TransformSequenceExtensions.cs +++ b/osu.Framework/Graphics/TransformSequenceExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK; using osuTK.Graphics; using osu.Framework.Graphics.Colour; @@ -10,7 +8,6 @@ using osu.Framework.Graphics.Transforms; using osu.Framework.Threading; using System; -using JetBrains.Annotations; using osu.Framework.Bindables; namespace osu.Framework.Graphics @@ -251,7 +248,7 @@ public static TransformSequence TransformSpacingTo(this TransformSequence< /// Smoothly adjusts the value of a over time. /// /// A to which further transforms can be added. - public static TransformSequence TransformBindableTo(this TransformSequence t, [NotNull] Bindable bindable, TValue newValue, double duration = 0, + public static TransformSequence TransformBindableTo(this TransformSequence t, Bindable bindable, TValue newValue, double duration = 0, Easing easing = Easing.None) where T : class, ITransformable => t.TransformBindableTo(bindable, newValue, duration, new DefaultEasingFunction(easing)); @@ -489,7 +486,7 @@ public static TransformSequence TransformSpacingTo(this Transform /// Smoothly adjusts the value of a over time. /// /// A to which further transforms can be added. - public static TransformSequence TransformBindableTo(this TransformSequence t, [NotNull] Bindable bindable, TValue newValue, double duration, TEasing easing) + public static TransformSequence TransformBindableTo(this TransformSequence t, Bindable bindable, TValue newValue, double duration, TEasing easing) where T : class, ITransformable where TEasing : IEasingFunction => t.Append(o => o.TransformBindableTo(bindable, newValue, duration, easing)); diff --git a/osu.Framework/Graphics/Transforms/DefaultEasingFunction.cs b/osu.Framework/Graphics/Transforms/DefaultEasingFunction.cs index f48785fb82..52339bbb50 100644 --- a/osu.Framework/Graphics/Transforms/DefaultEasingFunction.cs +++ b/osu.Framework/Graphics/Transforms/DefaultEasingFunction.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Graphics.Transforms diff --git a/osu.Framework/Graphics/Transforms/ITransformable.cs b/osu.Framework/Graphics/Transforms/ITransformable.cs index 0a84ab8907..54550edff6 100644 --- a/osu.Framework/Graphics/Transforms/ITransformable.cs +++ b/osu.Framework/Graphics/Transforms/ITransformable.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Timing; diff --git a/osu.Framework/Graphics/Transforms/TransformBindable.cs b/osu.Framework/Graphics/Transforms/TransformBindable.cs index a0200b60eb..f6552d6d56 100644 --- a/osu.Framework/Graphics/Transforms/TransformBindable.cs +++ b/osu.Framework/Graphics/Transforms/TransformBindable.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Utils; diff --git a/osu.Framework/Graphics/UserInterface/BasicButton.cs b/osu.Framework/Graphics/UserInterface/BasicButton.cs index 7d85081b24..4c9ea217ec 100644 --- a/osu.Framework/Graphics/UserInterface/BasicButton.cs +++ b/osu.Framework/Graphics/UserInterface/BasicButton.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics.Sprites; @@ -17,12 +15,8 @@ public partial class BasicButton : Button { public LocalisableString Text { - get => SpriteText?.Text ?? default; - set - { - if (SpriteText != null) - SpriteText.Text = value; - } + get => SpriteText.Text; + set => SpriteText.Text = value; } public Color4 BackgroundColour diff --git a/osu.Framework/Graphics/UserInterface/BasicCheckbox.cs b/osu.Framework/Graphics/UserInterface/BasicCheckbox.cs index 254741372b..8c41d7f5fe 100644 --- a/osu.Framework/Graphics/UserInterface/BasicCheckbox.cs +++ b/osu.Framework/Graphics/UserInterface/BasicCheckbox.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK; using osuTK.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework/Graphics/UserInterface/BasicColourPicker.cs b/osu.Framework/Graphics/UserInterface/BasicColourPicker.cs index f50369848b..a12f44c84d 100644 --- a/osu.Framework/Graphics/UserInterface/BasicColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/BasicColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Graphics.UserInterface { public partial class BasicColourPicker : ColourPicker diff --git a/osu.Framework/Graphics/UserInterface/BasicDirectorySelectorParentDirectory.cs b/osu.Framework/Graphics/UserInterface/BasicDirectorySelectorParentDirectory.cs index f42b0abd20..96715281b2 100644 --- a/osu.Framework/Graphics/UserInterface/BasicDirectorySelectorParentDirectory.cs +++ b/osu.Framework/Graphics/UserInterface/BasicDirectorySelectorParentDirectory.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.IO; using osu.Framework.Graphics.Sprites; diff --git a/osu.Framework/Graphics/UserInterface/BasicDropdown.cs b/osu.Framework/Graphics/UserInterface/BasicDropdown.cs index 80ca284b41..651b475b74 100644 --- a/osu.Framework/Graphics/UserInterface/BasicDropdown.cs +++ b/osu.Framework/Graphics/UserInterface/BasicDropdown.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Localisation; diff --git a/osu.Framework/Graphics/UserInterface/BasicHSVColourPicker.cs b/osu.Framework/Graphics/UserInterface/BasicHSVColourPicker.cs index e0ed733db6..567b979df5 100644 --- a/osu.Framework/Graphics/UserInterface/BasicHSVColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/BasicHSVColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osuTK; diff --git a/osu.Framework/Graphics/UserInterface/BasicHexColourPicker.cs b/osu.Framework/Graphics/UserInterface/BasicHexColourPicker.cs index a1caf65759..e095594935 100644 --- a/osu.Framework/Graphics/UserInterface/BasicHexColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/BasicHexColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Shapes; namespace osu.Framework.Graphics.UserInterface diff --git a/osu.Framework/Graphics/UserInterface/BasicMenu.cs b/osu.Framework/Graphics/UserInterface/BasicMenu.cs index d50a6b9e62..38c5401944 100644 --- a/osu.Framework/Graphics/UserInterface/BasicMenu.cs +++ b/osu.Framework/Graphics/UserInterface/BasicMenu.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; diff --git a/osu.Framework/Graphics/UserInterface/BasicPasswordTextBox.cs b/osu.Framework/Graphics/UserInterface/BasicPasswordTextBox.cs index 7dc26a8daf..b0791317b8 100644 --- a/osu.Framework/Graphics/UserInterface/BasicPasswordTextBox.cs +++ b/osu.Framework/Graphics/UserInterface/BasicPasswordTextBox.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input; namespace osu.Framework.Graphics.UserInterface diff --git a/osu.Framework/Graphics/UserInterface/BasicSliderBar.cs b/osu.Framework/Graphics/UserInterface/BasicSliderBar.cs index 1d5973319c..2babb3aa15 100644 --- a/osu.Framework/Graphics/UserInterface/BasicSliderBar.cs +++ b/osu.Framework/Graphics/UserInterface/BasicSliderBar.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osuTK; using osuTK.Graphics; diff --git a/osu.Framework/Graphics/UserInterface/BasicTextBox.cs b/osu.Framework/Graphics/UserInterface/BasicTextBox.cs index fc7332dab8..69609ee23b 100644 --- a/osu.Framework/Graphics/UserInterface/BasicTextBox.cs +++ b/osu.Framework/Graphics/UserInterface/BasicTextBox.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Containers; using osu.Framework.Graphics.Shapes; diff --git a/osu.Framework/Graphics/UserInterface/Caret.cs b/osu.Framework/Graphics/UserInterface/Caret.cs index 27cdfac2de..4c6189640d 100644 --- a/osu.Framework/Graphics/UserInterface/Caret.cs +++ b/osu.Framework/Graphics/UserInterface/Caret.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osuTK; diff --git a/osu.Framework/Graphics/UserInterface/Checkbox.cs b/osu.Framework/Graphics/UserInterface/Checkbox.cs index 3a27705214..8f4bcdbe93 100644 --- a/osu.Framework/Graphics/UserInterface/Checkbox.cs +++ b/osu.Framework/Graphics/UserInterface/Checkbox.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Framework.Input.Events; diff --git a/osu.Framework/Graphics/UserInterface/ColourPicker.cs b/osu.Framework/Graphics/UserInterface/ColourPicker.cs index 42d573e8f6..4aa0e52b84 100644 --- a/osu.Framework/Graphics/UserInterface/ColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/ColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework/Graphics/UserInterface/Counter.cs b/osu.Framework/Graphics/UserInterface/Counter.cs index 8bbd88e263..727d6fd665 100644 --- a/osu.Framework/Graphics/UserInterface/Counter.cs +++ b/osu.Framework/Graphics/UserInterface/Counter.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transforms; diff --git a/osu.Framework/Graphics/UserInterface/DropdownMenuItem.cs b/osu.Framework/Graphics/UserInterface/DropdownMenuItem.cs index bb51b1ab8c..4f9305f8aa 100644 --- a/osu.Framework/Graphics/UserInterface/DropdownMenuItem.cs +++ b/osu.Framework/Graphics/UserInterface/DropdownMenuItem.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Localisation; diff --git a/osu.Framework/Graphics/UserInterface/HSVColourPicker.cs b/osu.Framework/Graphics/UserInterface/HSVColourPicker.cs index 9504039771..f954193ca0 100644 --- a/osu.Framework/Graphics/UserInterface/HSVColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/HSVColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; diff --git a/osu.Framework/Graphics/UserInterface/HexColourPicker.cs b/osu.Framework/Graphics/UserInterface/HexColourPicker.cs index 749cb78a35..6dc2436fa0 100644 --- a/osu.Framework/Graphics/UserInterface/HexColourPicker.cs +++ b/osu.Framework/Graphics/UserInterface/HexColourPicker.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; diff --git a/osu.Framework/Graphics/UserInterface/IHasCurrentValue.cs b/osu.Framework/Graphics/UserInterface/IHasCurrentValue.cs index 57f2775c50..506ffcdf49 100644 --- a/osu.Framework/Graphics/UserInterface/IHasCurrentValue.cs +++ b/osu.Framework/Graphics/UserInterface/IHasCurrentValue.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; namespace osu.Framework.Graphics.UserInterface diff --git a/osu.Framework/Graphics/UserInterface/Menu.cs b/osu.Framework/Graphics/UserInterface/Menu.cs index a4e29179aa..cc7823d39e 100644 --- a/osu.Framework/Graphics/UserInterface/Menu.cs +++ b/osu.Framework/Graphics/UserInterface/Menu.cs @@ -496,7 +496,7 @@ private void menuItemClicked(DrawableMenuItem item) } // Check if there is a sub menu to display - if (item.Item.Items?.Count == 0) + if (item.Item.Items.Count == 0) { // This item must have attempted to invoke an action - close all menus if item allows if (item.CloseMenuOnClick) @@ -625,7 +625,7 @@ private void closeFromChild(MenuItem source) { if (IsHovered || (parentMenu?.IsHovered ?? false)) return; - if (triggeringItem?.Item.Items?.Contains(source) ?? triggeringItem == null) + if (triggeringItem?.Item.Items.Contains(source) ?? triggeringItem == null) { Close(); parentMenu?.closeFromChild(triggeringItem?.Item); @@ -834,7 +834,7 @@ public MenuItemState State /// protected bool IsActionable => hasSubmenu || (!Item.Action.Disabled && Item.Action.Value != null); - private bool hasSubmenu => Item.Items?.Count > 0; + private bool hasSubmenu => Item.Items.Count > 0; /// /// Called after the is modified or the hover state changes. @@ -892,7 +892,7 @@ protected override bool OnClick(ClickEvent e) if (!IsActionable) return true; - Item.Action.Value.Invoke(); + Item.Action.Value?.Invoke(); Clicked?.Invoke(this); return true; } diff --git a/osu.Framework/Graphics/UserInterface/MenuItem.cs b/osu.Framework/Graphics/UserInterface/MenuItem.cs index 41ed29b698..fc82a89a51 100644 --- a/osu.Framework/Graphics/UserInterface/MenuItem.cs +++ b/osu.Framework/Graphics/UserInterface/MenuItem.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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 osu.Framework.Bindables; @@ -20,7 +18,7 @@ public class MenuItem /// /// The that is performed when this is clicked. /// - public readonly Bindable Action = new Bindable(); + public readonly Bindable Action = new Bindable(); /// /// A list of items which are to be displayed in a sub-menu originating from this . @@ -50,7 +48,7 @@ protected MenuItem(Action action) /// /// The text to display. /// The to perform when clicked. - public MenuItem(LocalisableString text, Action action) + public MenuItem(LocalisableString text, Action? action) : this(text) { Action.Value = action; diff --git a/osu.Framework/Graphics/UserInterface/Popover.cs b/osu.Framework/Graphics/UserInterface/Popover.cs index e4cdfb248a..9679ca15cf 100644 --- a/osu.Framework/Graphics/UserInterface/Popover.cs +++ b/osu.Framework/Graphics/UserInterface/Popover.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Extensions; using osu.Framework.Extensions.EnumExtensions; diff --git a/osu.Framework/Graphics/UserInterface/SliderBar.cs b/osu.Framework/Graphics/UserInterface/SliderBar.cs index 6ab08472c4..24dcb4de2f 100644 --- a/osu.Framework/Graphics/UserInterface/SliderBar.cs +++ b/osu.Framework/Graphics/UserInterface/SliderBar.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Globalization; using osu.Framework.Bindables; diff --git a/osu.Framework/Graphics/Vector2Extensions.cs b/osu.Framework/Graphics/Vector2Extensions.cs index 072f0d517f..69bb00d0ce 100644 --- a/osu.Framework/Graphics/Vector2Extensions.cs +++ b/osu.Framework/Graphics/Vector2Extensions.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.CompilerServices; using osu.Framework.Graphics.Primitives; diff --git a/osu.Framework/Graphics/Video/AVHWDeviceTypePerformanceComparer.cs b/osu.Framework/Graphics/Video/AVHWDeviceTypePerformanceComparer.cs index 44e3677524..368a6ac9c7 100644 --- a/osu.Framework/Graphics/Video/AVHWDeviceTypePerformanceComparer.cs +++ b/osu.Framework/Graphics/Video/AVHWDeviceTypePerformanceComparer.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using FFmpeg.AutoGen; diff --git a/osu.Framework/Graphics/Video/FFmpegExtensions.cs b/osu.Framework/Graphics/Video/FFmpegExtensions.cs index ef639affa8..be6142ca9c 100644 --- a/osu.Framework/Graphics/Video/FFmpegExtensions.cs +++ b/osu.Framework/Graphics/Video/FFmpegExtensions.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using FFmpeg.AutoGen; namespace osu.Framework.Graphics.Video diff --git a/osu.Framework/Graphics/Video/HardwareVideoDecoder.cs b/osu.Framework/Graphics/Video/HardwareVideoDecoder.cs index df73677b1c..fd86366519 100644 --- a/osu.Framework/Graphics/Video/HardwareVideoDecoder.cs +++ b/osu.Framework/Graphics/Video/HardwareVideoDecoder.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.ComponentModel; diff --git a/osu.Framework/Graphics/Video/StdIo.cs b/osu.Framework/Graphics/Video/StdIo.cs index 102e3395fd..63a84b410f 100644 --- a/osu.Framework/Graphics/Video/StdIo.cs +++ b/osu.Framework/Graphics/Video/StdIo.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Graphics.Video { internal static class StdIo diff --git a/osu.Framework/Graphics/Video/VideoSprite.cs b/osu.Framework/Graphics/Video/VideoSprite.cs index 9ce3b6cd9b..43771868c8 100644 --- a/osu.Framework/Graphics/Video/VideoSprite.cs +++ b/osu.Framework/Graphics/Video/VideoSprite.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics.Shaders; using osu.Framework.Graphics.Sprites; diff --git a/osu.Framework/Graphics/Video/VideoTextureUpload.cs b/osu.Framework/Graphics/Video/VideoTextureUpload.cs index 31f6168c7e..ee6442cca5 100644 --- a/osu.Framework/Graphics/Video/VideoTextureUpload.cs +++ b/osu.Framework/Graphics/Video/VideoTextureUpload.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics.Textures; using osuTK.Graphics.ES30; diff --git a/osu.Framework/Graphics/Visualisation/Audio/AudioChannelDisplay.cs b/osu.Framework/Graphics/Visualisation/Audio/AudioChannelDisplay.cs index 10d046b11c..e4ba45fc36 100644 --- a/osu.Framework/Graphics/Visualisation/Audio/AudioChannelDisplay.cs +++ b/osu.Framework/Graphics/Visualisation/Audio/AudioChannelDisplay.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using ManagedBass; using ManagedBass.Mix; diff --git a/osu.Framework/Graphics/Visualisation/Audio/MixerDisplay.cs b/osu.Framework/Graphics/Visualisation/Audio/MixerDisplay.cs index 208e5046db..be15983b4a 100644 --- a/osu.Framework/Graphics/Visualisation/Audio/MixerDisplay.cs +++ b/osu.Framework/Graphics/Visualisation/Audio/MixerDisplay.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using ManagedBass.Mix; using osu.Framework.Audio.Mixing; diff --git a/osu.Framework/Graphics/Visualisation/DrawableInspector.cs b/osu.Framework/Graphics/Visualisation/DrawableInspector.cs index 8c44357704..7f64e4f107 100644 --- a/osu.Framework/Graphics/Visualisation/DrawableInspector.cs +++ b/osu.Framework/Graphics/Visualisation/DrawableInspector.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 osu.Framework.Allocation; diff --git a/osu.Framework/Graphics/Visualisation/IContainVisualisedDrawables.cs b/osu.Framework/Graphics/Visualisation/IContainVisualisedDrawables.cs index 72711e088d..5426cb9f01 100644 --- a/osu.Framework/Graphics/Visualisation/IContainVisualisedDrawables.cs +++ b/osu.Framework/Graphics/Visualisation/IContainVisualisedDrawables.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Graphics.Visualisation { /// diff --git a/osu.Framework/Graphics/Visualisation/TitleBar.cs b/osu.Framework/Graphics/Visualisation/TitleBar.cs index 89c4fee761..4ced440d09 100644 --- a/osu.Framework/Graphics/Visualisation/TitleBar.cs +++ b/osu.Framework/Graphics/Visualisation/TitleBar.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; diff --git a/osu.Framework/Graphics/Visualisation/ToolWindow.cs b/osu.Framework/Graphics/Visualisation/ToolWindow.cs index 187c49d1d5..98a5ba33fb 100644 --- a/osu.Framework/Graphics/Visualisation/ToolWindow.cs +++ b/osu.Framework/Graphics/Visualisation/ToolWindow.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Cursor; diff --git a/osu.Framework/IO/Serialization/ISerializableBindable.cs b/osu.Framework/IO/Serialization/ISerializableBindable.cs index 3686027a51..7805823c88 100644 --- a/osu.Framework/IO/Serialization/ISerializableBindable.cs +++ b/osu.Framework/IO/Serialization/ISerializableBindable.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Newtonsoft.Json; using osu.Framework.Bindables; diff --git a/osu.Framework/IO/Serialization/ISerializableSortedList.cs b/osu.Framework/IO/Serialization/ISerializableSortedList.cs index 40a56278b1..abbb5bf81a 100644 --- a/osu.Framework/IO/Serialization/ISerializableSortedList.cs +++ b/osu.Framework/IO/Serialization/ISerializableSortedList.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using Newtonsoft.Json; using osu.Framework.Lists; diff --git a/osu.Framework/IO/Stores/FontStore.cs b/osu.Framework/IO/Stores/FontStore.cs index 78a26fe783..0ad9094bc3 100644 --- a/osu.Framework/IO/Stores/FontStore.cs +++ b/osu.Framework/IO/Stores/FontStore.cs @@ -3,13 +3,13 @@ #nullable disable -using osu.Framework.Graphics.Textures; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading.Tasks; -using osu.Framework.Logging; -using System.Collections.Concurrent; -using JetBrains.Annotations; +using osu.Framework.Extensions.ObjectExtensions; using osu.Framework.Graphics.Rendering; +using osu.Framework.Graphics.Textures; +using osu.Framework.Logging; using osu.Framework.Platform; using osu.Framework.Text; @@ -131,7 +131,6 @@ public override void RemoveStore(ITextureStore store) base.RemoveStore(store); } - [CanBeNull] public ITexturedCharacterGlyph Get(string fontName, char character) { var key = (fontName, character); @@ -144,7 +143,7 @@ public ITexturedCharacterGlyph Get(string fontName, char character) foreach (var store in glyphStores) { if ((string.IsNullOrEmpty(fontName) || fontName == store.FontName) && store.HasGlyph(character)) - return namespacedGlyphCache[key] = new TexturedCharacterGlyph(store.Get(character), Get(textureName), 1 / ScaleAdjust); + return namespacedGlyphCache[key] = new TexturedCharacterGlyph(store.Get(character).AsNonNull(), Get(textureName), 1 / ScaleAdjust); } foreach (var store in nestedFontStores) diff --git a/osu.Framework/IO/Stores/GlyphStore.cs b/osu.Framework/IO/Stores/GlyphStore.cs index ce6b674671..715d42c99b 100644 --- a/osu.Framework/IO/Stores/GlyphStore.cs +++ b/osu.Framework/IO/Stores/GlyphStore.cs @@ -1,4 +1,4 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. #nullable disable @@ -118,7 +118,6 @@ protected string GetFilenameForPage(int page) return $@"{AssetName}_{page.ToString().PadLeft((Font.Pages.Count - 1).ToString().Length, '0')}.png"; } - [CanBeNull] public CharacterGlyph Get(char character) { if (Font == null) diff --git a/osu.Framework/IO/Stores/IGlyphStore.cs b/osu.Framework/IO/Stores/IGlyphStore.cs index 797e7dc693..ca0c06ac31 100644 --- a/osu.Framework/IO/Stores/IGlyphStore.cs +++ b/osu.Framework/IO/Stores/IGlyphStore.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Text; @@ -38,7 +36,7 @@ public interface IGlyphStore : IResourceStore /// /// The character to retrieve the for. /// The containing associated spacing information for . - CharacterGlyph Get(char character); + CharacterGlyph? Get(char character); /// /// Retrieves the kerning for a pair of characters. diff --git a/osu.Framework/IO/Stores/NamespacedResourceStore.cs b/osu.Framework/IO/Stores/NamespacedResourceStore.cs index f01d8cbd13..fd46d3ba10 100644 --- a/osu.Framework/IO/Stores/NamespacedResourceStore.cs +++ b/osu.Framework/IO/Stores/NamespacedResourceStore.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework/IStateful.cs b/osu.Framework/IStateful.cs index 231704b323..c453a8dbf9 100644 --- a/osu.Framework/IStateful.cs +++ b/osu.Framework/IStateful.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework diff --git a/osu.Framework/Input/Bindings/IKeyBinding.cs b/osu.Framework/Input/Bindings/IKeyBinding.cs index a140a461fd..f92d2d5b61 100644 --- a/osu.Framework/Input/Bindings/IKeyBinding.cs +++ b/osu.Framework/Input/Bindings/IKeyBinding.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input.Bindings { /// diff --git a/osu.Framework/Input/Bindings/IKeyBindingHandler.cs b/osu.Framework/Input/Bindings/IKeyBindingHandler.cs index 8db87d2fa0..82d1190d55 100644 --- a/osu.Framework/Input/Bindings/IKeyBindingHandler.cs +++ b/osu.Framework/Input/Bindings/IKeyBindingHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Input.Events; diff --git a/osu.Framework/Input/Bindings/IScrollBindingHandler.cs b/osu.Framework/Input/Bindings/IScrollBindingHandler.cs index 2d9aca2001..0a55cd8d18 100644 --- a/osu.Framework/Input/Bindings/IScrollBindingHandler.cs +++ b/osu.Framework/Input/Bindings/IScrollBindingHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.Events; namespace osu.Framework.Input.Bindings diff --git a/osu.Framework/Input/Bindings/InputKey.cs b/osu.Framework/Input/Bindings/InputKey.cs index e6e71447f9..d463e60e9d 100644 --- a/osu.Framework/Input/Bindings/InputKey.cs +++ b/osu.Framework/Input/Bindings/InputKey.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Utils; namespace osu.Framework.Input.Bindings diff --git a/osu.Framework/Input/Bindings/KeyBindingExtensions.cs b/osu.Framework/Input/Bindings/KeyBindingExtensions.cs index 18a3b056fa..6474823c63 100644 --- a/osu.Framework/Input/Bindings/KeyBindingExtensions.cs +++ b/osu.Framework/Input/Bindings/KeyBindingExtensions.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input.Bindings { public static class KeyBindingExtensions diff --git a/osu.Framework/Input/CustomInputManager.cs b/osu.Framework/Input/CustomInputManager.cs index e72d02fc20..4eb3565de7 100644 --- a/osu.Framework/Input/CustomInputManager.cs +++ b/osu.Framework/Input/CustomInputManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Immutable; using System.Linq; using osu.Framework.Input.Handlers; diff --git a/osu.Framework/Input/Events/ClickEvent.cs b/osu.Framework/Input/Events/ClickEvent.cs index 5904d3e6df..60e76d156e 100644 --- a/osu.Framework/Input/Events/ClickEvent.cs +++ b/osu.Framework/Input/Events/ClickEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/DoubleClickEvent.cs b/osu.Framework/Input/Events/DoubleClickEvent.cs index 1640776d6d..17ce9a8fa2 100644 --- a/osu.Framework/Input/Events/DoubleClickEvent.cs +++ b/osu.Framework/Input/Events/DoubleClickEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/DragEndEvent.cs b/osu.Framework/Input/Events/DragEndEvent.cs index d2f4a7c91f..9ea803d7d0 100644 --- a/osu.Framework/Input/Events/DragEndEvent.cs +++ b/osu.Framework/Input/Events/DragEndEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/DragEvent.cs b/osu.Framework/Input/Events/DragEvent.cs index e0809a0e35..1b451a3828 100644 --- a/osu.Framework/Input/Events/DragEvent.cs +++ b/osu.Framework/Input/Events/DragEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/DragStartEvent.cs b/osu.Framework/Input/Events/DragStartEvent.cs index ba6eb1e172..8362acd307 100644 --- a/osu.Framework/Input/Events/DragStartEvent.cs +++ b/osu.Framework/Input/Events/DragStartEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/FocusEvent.cs b/osu.Framework/Input/Events/FocusEvent.cs index 4f80ebfd22..2c7fba00f0 100644 --- a/osu.Framework/Input/Events/FocusEvent.cs +++ b/osu.Framework/Input/Events/FocusEvent.cs @@ -1,9 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Input.States; @@ -17,10 +14,9 @@ public class FocusEvent : UIEvent /// /// The that has lost focus, or null if nothing was previously focused. /// - [CanBeNull] - public readonly Drawable PreviouslyFocused; + public readonly Drawable? PreviouslyFocused; - public FocusEvent(InputState state, Drawable previouslyFocused) + public FocusEvent(InputState state, Drawable? previouslyFocused) : base(state) { PreviouslyFocused = previouslyFocused; diff --git a/osu.Framework/Input/Events/FocusLostEvent.cs b/osu.Framework/Input/Events/FocusLostEvent.cs index 70b15ae357..478d19e606 100644 --- a/osu.Framework/Input/Events/FocusLostEvent.cs +++ b/osu.Framework/Input/Events/FocusLostEvent.cs @@ -1,9 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Input.States; @@ -17,10 +14,9 @@ public class FocusLostEvent : UIEvent /// /// The that will gain focus, or null if nothing will gain focus. /// - [CanBeNull] - public readonly Drawable NextFocused; + public readonly Drawable? NextFocused; - public FocusLostEvent(InputState state, Drawable nextFocused) + public FocusLostEvent(InputState state, Drawable? nextFocused) : base(state) { NextFocused = nextFocused; diff --git a/osu.Framework/Input/Events/HoverEvent.cs b/osu.Framework/Input/Events/HoverEvent.cs index f904ecfa2e..df5e7f5f3c 100644 --- a/osu.Framework/Input/Events/HoverEvent.cs +++ b/osu.Framework/Input/Events/HoverEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/HoverLostEvent.cs b/osu.Framework/Input/Events/HoverLostEvent.cs index f33671891b..8be4aed28e 100644 --- a/osu.Framework/Input/Events/HoverLostEvent.cs +++ b/osu.Framework/Input/Events/HoverLostEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/JoystickAxisMoveEvent.cs b/osu.Framework/Input/Events/JoystickAxisMoveEvent.cs index 91c018e311..7bde433d58 100644 --- a/osu.Framework/Input/Events/JoystickAxisMoveEvent.cs +++ b/osu.Framework/Input/Events/JoystickAxisMoveEvent.cs @@ -1,9 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Extensions.TypeExtensions; using osu.Framework.Input.States; @@ -29,7 +26,7 @@ public class JoystickAxisMoveEvent : JoystickEvent /// public float Delta => Axis.Value - LastValue; - public JoystickAxisMoveEvent([NotNull] InputState state, JoystickAxis axis, float lastValue) + public JoystickAxisMoveEvent(InputState state, JoystickAxis axis, float lastValue) : base(state) { LastValue = lastValue; diff --git a/osu.Framework/Input/Events/JoystickButtonEvent.cs b/osu.Framework/Input/Events/JoystickButtonEvent.cs index bb703d46d7..8218909c6f 100644 --- a/osu.Framework/Input/Events/JoystickButtonEvent.cs +++ b/osu.Framework/Input/Events/JoystickButtonEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/Events/JoystickEvent.cs b/osu.Framework/Input/Events/JoystickEvent.cs index db6d7c1089..ef7c244821 100644 --- a/osu.Framework/Input/Events/JoystickEvent.cs +++ b/osu.Framework/Input/Events/JoystickEvent.cs @@ -1,18 +1,15 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Linq; -using JetBrains.Annotations; using osu.Framework.Input.States; namespace osu.Framework.Input.Events { public abstract class JoystickEvent : UIEvent { - protected JoystickEvent([NotNull] InputState state) + protected JoystickEvent(InputState state) : base(state) { } diff --git a/osu.Framework/Input/Events/JoystickPressEvent.cs b/osu.Framework/Input/Events/JoystickPressEvent.cs index 97e7806d54..927dc120c6 100644 --- a/osu.Framework/Input/Events/JoystickPressEvent.cs +++ b/osu.Framework/Input/Events/JoystickPressEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/JoystickReleaseEvent.cs b/osu.Framework/Input/Events/JoystickReleaseEvent.cs index 1b1abdf16e..8e857624ec 100644 --- a/osu.Framework/Input/Events/JoystickReleaseEvent.cs +++ b/osu.Framework/Input/Events/JoystickReleaseEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/KeyBindingEvent.cs b/osu.Framework/Input/Events/KeyBindingEvent.cs index 9070d67775..18c3390db5 100644 --- a/osu.Framework/Input/Events/KeyBindingEvent.cs +++ b/osu.Framework/Input/Events/KeyBindingEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/KeyBindingPressEvent.cs b/osu.Framework/Input/Events/KeyBindingPressEvent.cs index 6f8ac1d299..fdc871c7e2 100644 --- a/osu.Framework/Input/Events/KeyBindingPressEvent.cs +++ b/osu.Framework/Input/Events/KeyBindingPressEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/KeyBindingReleaseEvent.cs b/osu.Framework/Input/Events/KeyBindingReleaseEvent.cs index f2d7ed95b8..1293d15b6e 100644 --- a/osu.Framework/Input/Events/KeyBindingReleaseEvent.cs +++ b/osu.Framework/Input/Events/KeyBindingReleaseEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/KeyBindingScrollEvent.cs b/osu.Framework/Input/Events/KeyBindingScrollEvent.cs index b7e3288a4f..3c798c13ef 100644 --- a/osu.Framework/Input/Events/KeyBindingScrollEvent.cs +++ b/osu.Framework/Input/Events/KeyBindingScrollEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/KeyDownEvent.cs b/osu.Framework/Input/Events/KeyDownEvent.cs index d00ad23257..8071e75a81 100644 --- a/osu.Framework/Input/Events/KeyDownEvent.cs +++ b/osu.Framework/Input/Events/KeyDownEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; using osuTK.Input; diff --git a/osu.Framework/Input/Events/KeyUpEvent.cs b/osu.Framework/Input/Events/KeyUpEvent.cs index eef98649d5..cf0b6402be 100644 --- a/osu.Framework/Input/Events/KeyUpEvent.cs +++ b/osu.Framework/Input/Events/KeyUpEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK.Input; diff --git a/osu.Framework/Input/Events/KeyboardEvent.cs b/osu.Framework/Input/Events/KeyboardEvent.cs index 995e759ef1..a3cfdb5c31 100644 --- a/osu.Framework/Input/Events/KeyboardEvent.cs +++ b/osu.Framework/Input/Events/KeyboardEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/Events/MidiDownEvent.cs b/osu.Framework/Input/Events/MidiDownEvent.cs index dab24495ec..ef99505b9a 100644 --- a/osu.Framework/Input/Events/MidiDownEvent.cs +++ b/osu.Framework/Input/Events/MidiDownEvent.cs @@ -1,16 +1,13 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Input.States; namespace osu.Framework.Input.Events { public class MidiDownEvent : MidiEvent { - public MidiDownEvent([NotNull] InputState state, MidiKey key, byte velocity) + public MidiDownEvent(InputState state, MidiKey key, byte velocity) : base(state, key, velocity) { } diff --git a/osu.Framework/Input/Events/MidiEvent.cs b/osu.Framework/Input/Events/MidiEvent.cs index f94825ecc3..7622860cef 100644 --- a/osu.Framework/Input/Events/MidiEvent.cs +++ b/osu.Framework/Input/Events/MidiEvent.cs @@ -1,10 +1,7 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; -using JetBrains.Annotations; using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; @@ -30,7 +27,7 @@ public abstract class MidiEvent : UIEvent /// public IEnumerable PressedKeys => CurrentState.Midi.Keys; - protected MidiEvent([NotNull] InputState state, MidiKey key, byte velocity) + protected MidiEvent(InputState state, MidiKey key, byte velocity) : base(state) { Key = key; diff --git a/osu.Framework/Input/Events/MidiUpEvent.cs b/osu.Framework/Input/Events/MidiUpEvent.cs index 8b36d23655..8dc85b5f5a 100644 --- a/osu.Framework/Input/Events/MidiUpEvent.cs +++ b/osu.Framework/Input/Events/MidiUpEvent.cs @@ -1,16 +1,13 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Input.States; namespace osu.Framework.Input.Events { public class MidiUpEvent : MidiEvent { - public MidiUpEvent([NotNull] InputState state, MidiKey key) + public MidiUpEvent(InputState state, MidiKey key) : base(state, key, 0) { } diff --git a/osu.Framework/Input/Events/MouseButtonEvent.cs b/osu.Framework/Input/Events/MouseButtonEvent.cs index d4b6181a73..201bacd1d7 100644 --- a/osu.Framework/Input/Events/MouseButtonEvent.cs +++ b/osu.Framework/Input/Events/MouseButtonEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/Events/MouseDownEvent.cs b/osu.Framework/Input/Events/MouseDownEvent.cs index 506a33019f..01b4f340a3 100644 --- a/osu.Framework/Input/Events/MouseDownEvent.cs +++ b/osu.Framework/Input/Events/MouseDownEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/MouseEvent.cs b/osu.Framework/Input/Events/MouseEvent.cs index f2878b5ec3..b1f44fbd53 100644 --- a/osu.Framework/Input/Events/MouseEvent.cs +++ b/osu.Framework/Input/Events/MouseEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; using osuTK.Input; diff --git a/osu.Framework/Input/Events/MouseMoveEvent.cs b/osu.Framework/Input/Events/MouseMoveEvent.cs index 85c718d99a..3118447e41 100644 --- a/osu.Framework/Input/Events/MouseMoveEvent.cs +++ b/osu.Framework/Input/Events/MouseMoveEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/Events/MouseUpEvent.cs b/osu.Framework/Input/Events/MouseUpEvent.cs index 7d169eaa53..f0e9acea7b 100644 --- a/osu.Framework/Input/Events/MouseUpEvent.cs +++ b/osu.Framework/Input/Events/MouseUpEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; using osuTK.Input; diff --git a/osu.Framework/Input/Events/ScrollEvent.cs b/osu.Framework/Input/Events/ScrollEvent.cs index b4f4c2d048..d5dd77a109 100644 --- a/osu.Framework/Input/Events/ScrollEvent.cs +++ b/osu.Framework/Input/Events/ScrollEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/Events/TabletAuxiliaryButtonEvent.cs b/osu.Framework/Input/Events/TabletAuxiliaryButtonEvent.cs index d181416d1a..3ca4c690a0 100644 --- a/osu.Framework/Input/Events/TabletAuxiliaryButtonEvent.cs +++ b/osu.Framework/Input/Events/TabletAuxiliaryButtonEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/Events/TabletAuxiliaryButtonPressEvent.cs b/osu.Framework/Input/Events/TabletAuxiliaryButtonPressEvent.cs index 46d5c290d7..09b14452a4 100644 --- a/osu.Framework/Input/Events/TabletAuxiliaryButtonPressEvent.cs +++ b/osu.Framework/Input/Events/TabletAuxiliaryButtonPressEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/TabletAuxiliaryButtonReleaseEvent.cs b/osu.Framework/Input/Events/TabletAuxiliaryButtonReleaseEvent.cs index e85e64deba..c4055549c1 100644 --- a/osu.Framework/Input/Events/TabletAuxiliaryButtonReleaseEvent.cs +++ b/osu.Framework/Input/Events/TabletAuxiliaryButtonReleaseEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/TabletEvent.cs b/osu.Framework/Input/Events/TabletEvent.cs index fe7e485b3d..d3a99eb83b 100644 --- a/osu.Framework/Input/Events/TabletEvent.cs +++ b/osu.Framework/Input/Events/TabletEvent.cs @@ -1,17 +1,14 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; -using JetBrains.Annotations; using osu.Framework.Input.States; namespace osu.Framework.Input.Events { public abstract class TabletEvent : UIEvent { - protected TabletEvent([NotNull] InputState state) + protected TabletEvent(InputState state) : base(state) { } diff --git a/osu.Framework/Input/Events/TabletPenButtonEvent.cs b/osu.Framework/Input/Events/TabletPenButtonEvent.cs index 06fdfb8873..d9b366bb97 100644 --- a/osu.Framework/Input/Events/TabletPenButtonEvent.cs +++ b/osu.Framework/Input/Events/TabletPenButtonEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/Events/TabletPenButtonPressEvent.cs b/osu.Framework/Input/Events/TabletPenButtonPressEvent.cs index 97d5532b9e..a697d7172b 100644 --- a/osu.Framework/Input/Events/TabletPenButtonPressEvent.cs +++ b/osu.Framework/Input/Events/TabletPenButtonPressEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/TabletPenButtonReleaseEvent.cs b/osu.Framework/Input/Events/TabletPenButtonReleaseEvent.cs index 0ce5c47a3d..497af2d330 100644 --- a/osu.Framework/Input/Events/TabletPenButtonReleaseEvent.cs +++ b/osu.Framework/Input/Events/TabletPenButtonReleaseEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/TouchDownEvent.cs b/osu.Framework/Input/Events/TouchDownEvent.cs index 5cb8ba4d12..598c0d64a3 100644 --- a/osu.Framework/Input/Events/TouchDownEvent.cs +++ b/osu.Framework/Input/Events/TouchDownEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.Events diff --git a/osu.Framework/Input/Events/TouchEvent.cs b/osu.Framework/Input/Events/TouchEvent.cs index 787c221204..524846f811 100644 --- a/osu.Framework/Input/Events/TouchEvent.cs +++ b/osu.Framework/Input/Events/TouchEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/Events/TouchMoveEvent.cs b/osu.Framework/Input/Events/TouchMoveEvent.cs index 1d030d5155..552df4bf5e 100644 --- a/osu.Framework/Input/Events/TouchMoveEvent.cs +++ b/osu.Framework/Input/Events/TouchMoveEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/Events/TouchUpEvent.cs b/osu.Framework/Input/Events/TouchUpEvent.cs index 3449172838..f80c0a9ee4 100644 --- a/osu.Framework/Input/Events/TouchUpEvent.cs +++ b/osu.Framework/Input/Events/TouchUpEvent.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/FrameworkActionContainer.cs b/osu.Framework/Input/FrameworkActionContainer.cs index e8eb239971..a2e140eefa 100644 --- a/osu.Framework/Input/FrameworkActionContainer.cs +++ b/osu.Framework/Input/FrameworkActionContainer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.Bindings; diff --git a/osu.Framework/Input/Handlers/IHasCursorSensitivity.cs b/osu.Framework/Input/Handlers/IHasCursorSensitivity.cs index 4a36dcc779..23c22cefca 100644 --- a/osu.Framework/Input/Handlers/IHasCursorSensitivity.cs +++ b/osu.Framework/Input/Handlers/IHasCursorSensitivity.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; namespace osu.Framework.Input.Handlers diff --git a/osu.Framework/Input/Handlers/INeedsMousePositionFeedback.cs b/osu.Framework/Input/Handlers/INeedsMousePositionFeedback.cs index 99be6571cb..d98eaf1bea 100644 --- a/osu.Framework/Input/Handlers/INeedsMousePositionFeedback.cs +++ b/osu.Framework/Input/Handlers/INeedsMousePositionFeedback.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK; namespace osu.Framework.Input.Handlers diff --git a/osu.Framework/Input/Handlers/Joystick/JoystickHandler.cs b/osu.Framework/Input/Handlers/Joystick/JoystickHandler.cs index 6f9dc261f3..75fdfe08ec 100644 --- a/osu.Framework/Input/Handlers/Joystick/JoystickHandler.cs +++ b/osu.Framework/Input/Handlers/Joystick/JoystickHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Bindables; using osu.Framework.Input.StateChanges; diff --git a/osu.Framework/Input/Handlers/Keyboard/KeyboardHandler.cs b/osu.Framework/Input/Handlers/Keyboard/KeyboardHandler.cs index 4645b0492e..44eafeda59 100644 --- a/osu.Framework/Input/Handlers/Keyboard/KeyboardHandler.cs +++ b/osu.Framework/Input/Handlers/Keyboard/KeyboardHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges; using osu.Framework.Platform; using osu.Framework.Statistics; diff --git a/osu.Framework/Input/Handlers/Tablet/AbsoluteTabletMode.cs b/osu.Framework/Input/Handlers/Tablet/AbsoluteTabletMode.cs index 4d4e528bc6..e7ca367265 100644 --- a/osu.Framework/Input/Handlers/Tablet/AbsoluteTabletMode.cs +++ b/osu.Framework/Input/Handlers/Tablet/AbsoluteTabletMode.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using OpenTabletDriver.Plugin.Output; using OpenTabletDriver.Plugin.Platform.Pointer; diff --git a/osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs b/osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs index 8709b590d3..85870b2446 100644 --- a/osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs +++ b/osu.Framework/Input/Handlers/Tablet/ITabletHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; using osuTK; diff --git a/osu.Framework/Input/Handlers/Tablet/TabletInfo.cs b/osu.Framework/Input/Handlers/Tablet/TabletInfo.cs index 92f6b3e373..56402c180b 100644 --- a/osu.Framework/Input/Handlers/Tablet/TabletInfo.cs +++ b/osu.Framework/Input/Handlers/Tablet/TabletInfo.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK; namespace osu.Framework.Input.Handlers.Tablet diff --git a/osu.Framework/Input/InputResampler.cs b/osu.Framework/Input/InputResampler.cs index e1c018dab1..03fc3e7ce8 100644 --- a/osu.Framework/Input/InputResampler.cs +++ b/osu.Framework/Input/InputResampler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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 osuTK; diff --git a/osu.Framework/Input/JoystickAxis.cs b/osu.Framework/Input/JoystickAxis.cs index 3020c83d29..ee451029f9 100644 --- a/osu.Framework/Input/JoystickAxis.cs +++ b/osu.Framework/Input/JoystickAxis.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input { public readonly struct JoystickAxis diff --git a/osu.Framework/Input/JoystickAxisSource.cs b/osu.Framework/Input/JoystickAxisSource.cs index 1d99462b77..24d282a804 100644 --- a/osu.Framework/Input/JoystickAxisSource.cs +++ b/osu.Framework/Input/JoystickAxisSource.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input { public enum JoystickAxisSource diff --git a/osu.Framework/Input/JoystickButton.cs b/osu.Framework/Input/JoystickButton.cs index 7ba89305d4..f839b1defc 100644 --- a/osu.Framework/Input/JoystickButton.cs +++ b/osu.Framework/Input/JoystickButton.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input { public enum JoystickButton diff --git a/osu.Framework/Input/JoystickButtonEventManager.cs b/osu.Framework/Input/JoystickButtonEventManager.cs index 7378a52207..37968e6032 100644 --- a/osu.Framework/Input/JoystickButtonEventManager.cs +++ b/osu.Framework/Input/JoystickButtonEventManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Input.Events; @@ -19,12 +17,7 @@ public JoystickButtonEventManager(JoystickButton button) protected override Drawable HandleButtonDown(InputState state, List targets) => PropagateButtonEvent(targets, new JoystickPressEvent(state, Button)); - protected override void HandleButtonUp(InputState state, List targets) - { - if (targets == null) - return; - + protected override void HandleButtonUp(InputState state, List targets) => PropagateButtonEvent(targets, new JoystickReleaseEvent(state, Button)); - } } } diff --git a/osu.Framework/Input/KeyEventManager.cs b/osu.Framework/Input/KeyEventManager.cs index fc239ce922..c157b5fee3 100644 --- a/osu.Framework/Input/KeyEventManager.cs +++ b/osu.Framework/Input/KeyEventManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Linq; using osu.Framework.Extensions.ObjectExtensions; @@ -33,12 +31,7 @@ public void HandleRepeat(InputState state) protected override Drawable HandleButtonDown(InputState state, List targets) => PropagateButtonEvent(targets, new KeyDownEvent(state, Button)); - protected override void HandleButtonUp(InputState state, List targets) - { - if (targets == null) - return; - + protected override void HandleButtonUp(InputState state, List targets) => PropagateButtonEvent(targets, new KeyUpEvent(state, Button)); - } } } diff --git a/osu.Framework/Input/MidiKey.cs b/osu.Framework/Input/MidiKey.cs index 9ec977f7f4..fb2adea015 100644 --- a/osu.Framework/Input/MidiKey.cs +++ b/osu.Framework/Input/MidiKey.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input { public enum MidiKey diff --git a/osu.Framework/Input/MidiKeyEventManager.cs b/osu.Framework/Input/MidiKeyEventManager.cs index 8b0151ea5b..acc7fae2f2 100644 --- a/osu.Framework/Input/MidiKeyEventManager.cs +++ b/osu.Framework/Input/MidiKeyEventManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Input.Events; @@ -19,12 +17,7 @@ public MidiKeyEventManager(MidiKey button) protected override Drawable HandleButtonDown(InputState state, List targets) => PropagateButtonEvent(targets, new MidiDownEvent(state, Button, state.Midi.Velocities[Button])); - protected override void HandleButtonUp(InputState state, List targets) - { - if (targets == null) - return; - + protected override void HandleButtonUp(InputState state, List targets) => PropagateButtonEvent(targets, new MidiUpEvent(state, Button)); - } } } diff --git a/osu.Framework/Input/PassThroughInputManager.cs b/osu.Framework/Input/PassThroughInputManager.cs index f905ce5b46..014fa8afd9 100644 --- a/osu.Framework/Input/PassThroughInputManager.cs +++ b/osu.Framework/Input/PassThroughInputManager.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Linq; using osu.Framework.Graphics; @@ -181,13 +182,13 @@ protected virtual void SyncInputState(InputState state) new TouchInput(touchStateDifference.deactivated, false).Apply(CurrentState, this); new TouchInput(touchStateDifference.activated, true).Apply(CurrentState, this); - new JoystickButtonInput(state?.Joystick?.Buttons, CurrentState.Joystick.Buttons).Apply(CurrentState, this); - new JoystickAxisInput(state?.Joystick?.GetAxes()).Apply(CurrentState, this); + new JoystickButtonInput(state?.Joystick?.Buttons ?? new ButtonStates(), CurrentState.Joystick.Buttons).Apply(CurrentState, this); + new JoystickAxisInput(state?.Joystick?.GetAxes() ?? Array.Empty()).Apply(CurrentState, this); - new MidiKeyInput(state?.Midi, CurrentState.Midi).Apply(CurrentState, this); + new MidiKeyInput(state?.Midi ?? new MidiState(), CurrentState.Midi).Apply(CurrentState, this); - new TabletPenButtonInput(state?.Tablet.PenButtons, CurrentState.Tablet.PenButtons).Apply(CurrentState, this); - new TabletAuxiliaryButtonInput(state?.Tablet.AuxiliaryButtons, CurrentState.Tablet.AuxiliaryButtons).Apply(CurrentState, this); + new TabletPenButtonInput(state?.Tablet.PenButtons ?? new ButtonStates(), CurrentState.Tablet.PenButtons).Apply(CurrentState, this); + new TabletAuxiliaryButtonInput(state?.Tablet.AuxiliaryButtons ?? new ButtonStates(), CurrentState.Tablet.AuxiliaryButtons).Apply(CurrentState, this); } } } diff --git a/osu.Framework/Input/PlatformActionContainer.cs b/osu.Framework/Input/PlatformActionContainer.cs index 35a5ff2ef4..f96e07efbc 100644 --- a/osu.Framework/Input/PlatformActionContainer.cs +++ b/osu.Framework/Input/PlatformActionContainer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Input.Bindings; @@ -19,7 +17,7 @@ namespace osu.Framework.Input public partial class PlatformActionContainer : KeyBindingContainer, IHandleGlobalKeyboardInput { [Resolved] - private GameHost host { get; set; } + private GameHost host { get; set; } = null!; public PlatformActionContainer() : base(SimultaneousBindingMode.None, KeyCombinationMatchingMode.Modifiers) diff --git a/osu.Framework/Input/SDL2WindowTextInput.cs b/osu.Framework/Input/SDL2WindowTextInput.cs index 368cd47f44..3f9c3c7853 100644 --- a/osu.Framework/Input/SDL2WindowTextInput.cs +++ b/osu.Framework/Input/SDL2WindowTextInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Primitives; using osu.Framework.Platform; @@ -32,7 +30,7 @@ private void handleTextInput(string text) } } - private void handleTextEditing(string text, int selectionStart, int selectionLength) + private void handleTextEditing(string? text, int selectionStart, int selectionLength) { if (text == null) return; diff --git a/osu.Framework/Input/StateChanges/ButtonInput.cs b/osu.Framework/Input/StateChanges/ButtonInput.cs index 1eb83a51ae..88e18c2c94 100644 --- a/osu.Framework/Input/StateChanges/ButtonInput.cs +++ b/osu.Framework/Input/StateChanges/ButtonInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Collections.Immutable; using osu.Framework.Input.StateChanges.Events; @@ -43,7 +41,7 @@ protected ButtonInput(TButton button, bool isPressed) /// /// The newer . /// The older . - protected ButtonInput(ButtonStates current, ButtonStates previous) + protected ButtonInput(ButtonStates? current, ButtonStates? previous) { var difference = (current ?? new ButtonStates()).EnumerateDifference(previous ?? new ButtonStates()); diff --git a/osu.Framework/Input/StateChanges/ButtonInputEntry.cs b/osu.Framework/Input/StateChanges/ButtonInputEntry.cs index a7bf6c8454..546c144c97 100644 --- a/osu.Framework/Input/StateChanges/ButtonInputEntry.cs +++ b/osu.Framework/Input/StateChanges/ButtonInputEntry.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Input.StateChanges { /// diff --git a/osu.Framework/Input/StateChanges/Events/ButtonStateChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/ButtonStateChangeEvent.cs index 4e204a29ac..a72f4af384 100644 --- a/osu.Framework/Input/StateChanges/Events/ButtonStateChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/ButtonStateChangeEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.StateChanges.Events diff --git a/osu.Framework/Input/StateChanges/Events/InputStateChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/InputStateChangeEvent.cs index a06d3a7ffe..1862230351 100644 --- a/osu.Framework/Input/StateChanges/Events/InputStateChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/InputStateChangeEvent.cs @@ -1,10 +1,7 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; -using JetBrains.Annotations; using osu.Framework.Input.States; namespace osu.Framework.Input.StateChanges.Events @@ -18,14 +15,12 @@ public abstract class InputStateChangeEvent /// /// The changed by this event. /// - [NotNull] public readonly InputState State; /// /// The that caused this input state change. /// - [CanBeNull] - public readonly IInput Input; + public readonly IInput? Input; protected InputStateChangeEvent(InputState state, IInput input) { diff --git a/osu.Framework/Input/StateChanges/Events/JoystickAxisChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/JoystickAxisChangeEvent.cs index c3a4aa46b1..a05387f619 100644 --- a/osu.Framework/Input/StateChanges/Events/JoystickAxisChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/JoystickAxisChangeEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.StateChanges.Events diff --git a/osu.Framework/Input/StateChanges/Events/MousePositionChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/MousePositionChangeEvent.cs index 7c8d433312..8b0958ab75 100644 --- a/osu.Framework/Input/StateChanges/Events/MousePositionChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/MousePositionChangeEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/Events/MouseScrollChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/MouseScrollChangeEvent.cs index 15295b1aec..35dec2daf3 100644 --- a/osu.Framework/Input/StateChanges/Events/MouseScrollChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/MouseScrollChangeEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/Events/TouchStateChangeEvent.cs b/osu.Framework/Input/StateChanges/Events/TouchStateChangeEvent.cs index 850bc840b7..cf2b25ed1d 100644 --- a/osu.Framework/Input/StateChanges/Events/TouchStateChangeEvent.cs +++ b/osu.Framework/Input/StateChanges/Events/TouchStateChangeEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/IInput.cs b/osu.Framework/Input/StateChanges/IInput.cs index 3f647d1437..ecfc002eaf 100644 --- a/osu.Framework/Input/StateChanges/IInput.cs +++ b/osu.Framework/Input/StateChanges/IInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.States; namespace osu.Framework.Input.StateChanges diff --git a/osu.Framework/Input/StateChanges/IInputStateChangeHandler.cs b/osu.Framework/Input/StateChanges/IInputStateChangeHandler.cs index 7033dff7c5..77d1ea209d 100644 --- a/osu.Framework/Input/StateChanges/IInputStateChangeHandler.cs +++ b/osu.Framework/Input/StateChanges/IInputStateChangeHandler.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/StateChanges/ISourcedFromTouch.cs b/osu.Framework/Input/StateChanges/ISourcedFromTouch.cs index 86f3a9feeb..d06a6e308e 100644 --- a/osu.Framework/Input/StateChanges/ISourcedFromTouch.cs +++ b/osu.Framework/Input/StateChanges/ISourcedFromTouch.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; namespace osu.Framework.Input.StateChanges diff --git a/osu.Framework/Input/StateChanges/JoystickAxisInput.cs b/osu.Framework/Input/StateChanges/JoystickAxisInput.cs index ea62274c60..2a939c1298 100644 --- a/osu.Framework/Input/StateChanges/JoystickAxisInput.cs +++ b/osu.Framework/Input/StateChanges/JoystickAxisInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework/Input/StateChanges/JoystickButtonInput.cs b/osu.Framework/Input/StateChanges/JoystickButtonInput.cs index a13013f229..61538ef5c4 100644 --- a/osu.Framework/Input/StateChanges/JoystickButtonInput.cs +++ b/osu.Framework/Input/StateChanges/JoystickButtonInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/StateChanges/KeyboardKeyInput.cs b/osu.Framework/Input/StateChanges/KeyboardKeyInput.cs index 1bd4bcdcbc..769ffad3ab 100644 --- a/osu.Framework/Input/StateChanges/KeyboardKeyInput.cs +++ b/osu.Framework/Input/StateChanges/KeyboardKeyInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; using osuTK.Input; @@ -21,7 +19,7 @@ public KeyboardKeyInput(Key button, bool isPressed) { } - public KeyboardKeyInput(ButtonStates current, ButtonStates previous) + public KeyboardKeyInput(ButtonStates? current, ButtonStates? previous) : base(current, previous) { } diff --git a/osu.Framework/Input/StateChanges/MidiKeyInput.cs b/osu.Framework/Input/StateChanges/MidiKeyInput.cs index 389eedf999..e828285287 100644 --- a/osu.Framework/Input/StateChanges/MidiKeyInput.cs +++ b/osu.Framework/Input/StateChanges/MidiKeyInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Linq; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/StateChanges/MouseButtonInput.cs b/osu.Framework/Input/StateChanges/MouseButtonInput.cs index 949e1d2c79..2debe2d766 100644 --- a/osu.Framework/Input/StateChanges/MouseButtonInput.cs +++ b/osu.Framework/Input/StateChanges/MouseButtonInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; using osuTK.Input; diff --git a/osu.Framework/Input/StateChanges/MouseButtonInputFromTouch.cs b/osu.Framework/Input/StateChanges/MouseButtonInputFromTouch.cs index 63e69ddb22..572fd06166 100644 --- a/osu.Framework/Input/StateChanges/MouseButtonInputFromTouch.cs +++ b/osu.Framework/Input/StateChanges/MouseButtonInputFromTouch.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; using osuTK.Input; diff --git a/osu.Framework/Input/StateChanges/MousePositionAbsoluteInput.cs b/osu.Framework/Input/StateChanges/MousePositionAbsoluteInput.cs index becaa224b1..4bef388c47 100644 --- a/osu.Framework/Input/StateChanges/MousePositionAbsoluteInput.cs +++ b/osu.Framework/Input/StateChanges/MousePositionAbsoluteInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/MousePositionAbsoluteInputFromTouch.cs b/osu.Framework/Input/StateChanges/MousePositionAbsoluteInputFromTouch.cs index 27c4915ce6..22d414c9ca 100644 --- a/osu.Framework/Input/StateChanges/MousePositionAbsoluteInputFromTouch.cs +++ b/osu.Framework/Input/StateChanges/MousePositionAbsoluteInputFromTouch.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; namespace osu.Framework.Input.StateChanges diff --git a/osu.Framework/Input/StateChanges/MousePositionRelativeInput.cs b/osu.Framework/Input/StateChanges/MousePositionRelativeInput.cs index a7da88b3bf..19f384794f 100644 --- a/osu.Framework/Input/StateChanges/MousePositionRelativeInput.cs +++ b/osu.Framework/Input/StateChanges/MousePositionRelativeInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/MouseScrollRelativeInput.cs b/osu.Framework/Input/StateChanges/MouseScrollRelativeInput.cs index 5b337de682..cf368f483c 100644 --- a/osu.Framework/Input/StateChanges/MouseScrollRelativeInput.cs +++ b/osu.Framework/Input/StateChanges/MouseScrollRelativeInput.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.StateChanges.Events; using osu.Framework.Input.States; using osuTK; diff --git a/osu.Framework/Input/StateChanges/TabletAuxiliaryButtonInput.cs b/osu.Framework/Input/StateChanges/TabletAuxiliaryButtonInput.cs index ebedc45f80..85f4a38a6d 100644 --- a/osu.Framework/Input/StateChanges/TabletAuxiliaryButtonInput.cs +++ b/osu.Framework/Input/StateChanges/TabletAuxiliaryButtonInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/StateChanges/TabletPenButtonInput.cs b/osu.Framework/Input/StateChanges/TabletPenButtonInput.cs index d6f14ea22f..fc95828c2a 100644 --- a/osu.Framework/Input/StateChanges/TabletPenButtonInput.cs +++ b/osu.Framework/Input/StateChanges/TabletPenButtonInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Input.States; diff --git a/osu.Framework/Input/StateChanges/TouchInput.cs b/osu.Framework/Input/StateChanges/TouchInput.cs index 99ca1a9873..921708283b 100644 --- a/osu.Framework/Input/StateChanges/TouchInput.cs +++ b/osu.Framework/Input/StateChanges/TouchInput.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Input.StateChanges.Events; diff --git a/osu.Framework/Input/States/ButtonStates.cs b/osu.Framework/Input/States/ButtonStates.cs index e4926d5a15..74f31d34f5 100644 --- a/osu.Framework/Input/States/ButtonStates.cs +++ b/osu.Framework/Input/States/ButtonStates.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Collections; using System.Collections.Generic; diff --git a/osu.Framework/Input/States/JoystickState.cs b/osu.Framework/Input/States/JoystickState.cs index 6c3c356652..03b592d7f9 100644 --- a/osu.Framework/Input/States/JoystickState.cs +++ b/osu.Framework/Input/States/JoystickState.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Linq; diff --git a/osu.Framework/Input/States/KeyboardState.cs b/osu.Framework/Input/States/KeyboardState.cs index e11b13f360..40fbe2cbc8 100644 --- a/osu.Framework/Input/States/KeyboardState.cs +++ b/osu.Framework/Input/States/KeyboardState.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK.Input; namespace osu.Framework.Input.States diff --git a/osu.Framework/Input/States/MidiState.cs b/osu.Framework/Input/States/MidiState.cs index df0e9ca284..aa8f3dbd04 100644 --- a/osu.Framework/Input/States/MidiState.cs +++ b/osu.Framework/Input/States/MidiState.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; namespace osu.Framework.Input.States diff --git a/osu.Framework/Input/States/TabletState.cs b/osu.Framework/Input/States/TabletState.cs index 405c466063..557bf51d0e 100644 --- a/osu.Framework/Input/States/TabletState.cs +++ b/osu.Framework/Input/States/TabletState.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions.TypeExtensions; using osuTK; diff --git a/osu.Framework/Input/States/TouchState.cs b/osu.Framework/Input/States/TouchState.cs index 3db2d5b24c..8a26e4d401 100644 --- a/osu.Framework/Input/States/TouchState.cs +++ b/osu.Framework/Input/States/TouchState.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework/Input/TabletAuxiliaryButtonEventManager.cs b/osu.Framework/Input/TabletAuxiliaryButtonEventManager.cs index a1538fe2b2..1e633d4f64 100644 --- a/osu.Framework/Input/TabletAuxiliaryButtonEventManager.cs +++ b/osu.Framework/Input/TabletAuxiliaryButtonEventManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Input.Events; @@ -19,12 +17,6 @@ public TabletAuxiliaryButtonEventManager(TabletAuxiliaryButton button) protected override Drawable HandleButtonDown(InputState state, List targets) => PropagateButtonEvent(targets, new TabletAuxiliaryButtonPressEvent(state, Button)); - protected override void HandleButtonUp(InputState state, List targets) - { - if (targets == null) - return; - - PropagateButtonEvent(targets, new TabletAuxiliaryButtonReleaseEvent(state, Button)); - } + protected override void HandleButtonUp(InputState state, List targets) => PropagateButtonEvent(targets, new TabletAuxiliaryButtonReleaseEvent(state, Button)); } } diff --git a/osu.Framework/Input/TabletPenButtonEventManager.cs b/osu.Framework/Input/TabletPenButtonEventManager.cs index 0bcba8a5f0..2d550ca52b 100644 --- a/osu.Framework/Input/TabletPenButtonEventManager.cs +++ b/osu.Framework/Input/TabletPenButtonEventManager.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Input.Events; @@ -19,12 +17,6 @@ public TabletPenButtonEventManager(TabletPenButton button) protected override Drawable HandleButtonDown(InputState state, List targets) => PropagateButtonEvent(targets, new TabletPenButtonPressEvent(state, Button)); - protected override void HandleButtonUp(InputState state, List targets) - { - if (targets == null) - return; - - PropagateButtonEvent(targets, new TabletPenButtonReleaseEvent(state, Button)); - } + protected override void HandleButtonUp(InputState state, List targets) => PropagateButtonEvent(targets, new TabletPenButtonReleaseEvent(state, Button)); } } diff --git a/osu.Framework/Input/UserInputManager.cs b/osu.Framework/Input/UserInputManager.cs index a1c9471464..3a44dcb8a1 100644 --- a/osu.Framework/Input/UserInputManager.cs +++ b/osu.Framework/Input/UserInputManager.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Collections.Immutable; using System.Drawing; diff --git a/osu.Framework/Layout/InvalidationSource.cs b/osu.Framework/Layout/InvalidationSource.cs index 97abfcbf30..48fb317197 100644 --- a/osu.Framework/Layout/InvalidationSource.cs +++ b/osu.Framework/Layout/InvalidationSource.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; diff --git a/osu.Framework/Lists/INotifyArrayChanged.cs b/osu.Framework/Lists/INotifyArrayChanged.cs index 4468b6d04d..073c912b10 100644 --- a/osu.Framework/Lists/INotifyArrayChanged.cs +++ b/osu.Framework/Lists/INotifyArrayChanged.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Lists diff --git a/osu.Framework/Lists/IWeakList.cs b/osu.Framework/Lists/IWeakList.cs index 79a37d7e63..7ccc72fc43 100644 --- a/osu.Framework/Lists/IWeakList.cs +++ b/osu.Framework/Lists/IWeakList.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Lists diff --git a/osu.Framework/Lists/LazyList.cs b/osu.Framework/Lists/LazyList.cs index aebc351934..3090639c47 100644 --- a/osu.Framework/Lists/LazyList.cs +++ b/osu.Framework/Lists/LazyList.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Collections; using System.Collections.Generic; diff --git a/osu.Framework/Localisation/ILocalisedBindableString.cs b/osu.Framework/Localisation/ILocalisedBindableString.cs index 9539a61a85..9c8c44bc7e 100644 --- a/osu.Framework/Localisation/ILocalisedBindableString.cs +++ b/osu.Framework/Localisation/ILocalisedBindableString.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Bindables; namespace osu.Framework.Localisation diff --git a/osu.Framework/Localisation/LocalisableDescriptionAttribute.cs b/osu.Framework/Localisation/LocalisableDescriptionAttribute.cs index 96d526d7bc..d2c0a0dd48 100644 --- a/osu.Framework/Localisation/LocalisableDescriptionAttribute.cs +++ b/osu.Framework/Localisation/LocalisableDescriptionAttribute.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Extensions; diff --git a/osu.Framework/Logging/LoadingComponentsLogger.cs b/osu.Framework/Logging/LoadingComponentsLogger.cs index 28e05b405c..463bc65623 100644 --- a/osu.Framework/Logging/LoadingComponentsLogger.cs +++ b/osu.Framework/Logging/LoadingComponentsLogger.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using System.Threading; using osu.Framework.Development; diff --git a/osu.Framework/Logging/RollingTime.cs b/osu.Framework/Logging/RollingTime.cs index 9cb43e51ff..8ec0ef5462 100644 --- a/osu.Framework/Logging/RollingTime.cs +++ b/osu.Framework/Logging/RollingTime.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Logging diff --git a/osu.Framework/Physics/IRigidBody.cs b/osu.Framework/Physics/IRigidBody.cs index fd1ab34a1f..cf3efae350 100644 --- a/osu.Framework/Physics/IRigidBody.cs +++ b/osu.Framework/Physics/IRigidBody.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osuTK; using osu.Framework.Graphics; diff --git a/osu.Framework/Physics/RigidBodySimulation.cs b/osu.Framework/Physics/RigidBodySimulation.cs index c8c81d9a48..eeb0e6ef1b 100644 --- a/osu.Framework/Physics/RigidBodySimulation.cs +++ b/osu.Framework/Physics/RigidBodySimulation.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK; using osu.Framework.Graphics; using System.Collections.Generic; diff --git a/osu.Framework/Platform/DesktopStorage.cs b/osu.Framework/Platform/DesktopStorage.cs index 3665994dd4..9e4caa8b2e 100644 --- a/osu.Framework/Platform/DesktopStorage.cs +++ b/osu.Framework/Platform/DesktopStorage.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Platform { public class DesktopStorage : NativeStorage diff --git a/osu.Framework/Platform/ExecutionMode.cs b/osu.Framework/Platform/ExecutionMode.cs index d87b6442de..9481ebcca5 100644 --- a/osu.Framework/Platform/ExecutionMode.cs +++ b/osu.Framework/Platform/ExecutionMode.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.ComponentModel; namespace osu.Framework.Platform diff --git a/osu.Framework/Platform/FlushingStream.cs b/osu.Framework/Platform/FlushingStream.cs index ea399527bc..e6609f6d2c 100644 --- a/osu.Framework/Platform/FlushingStream.cs +++ b/osu.Framework/Platform/FlushingStream.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.IO; namespace osu.Framework.Platform diff --git a/osu.Framework/Platform/IIpcHost.cs b/osu.Framework/Platform/IIpcHost.cs index 5d9aaa55b6..dc27d8e4bc 100644 --- a/osu.Framework/Platform/IIpcHost.cs +++ b/osu.Framework/Platform/IIpcHost.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Threading.Tasks; diff --git a/osu.Framework/Platform/Linux/LinuxReadableKeyCombinationProvider.cs b/osu.Framework/Platform/Linux/LinuxReadableKeyCombinationProvider.cs index 5f400e1d75..532ac01df9 100644 --- a/osu.Framework/Platform/Linux/LinuxReadableKeyCombinationProvider.cs +++ b/osu.Framework/Platform/Linux/LinuxReadableKeyCombinationProvider.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.Bindings; using osu.Framework.Platform.SDL2; using SDL2; diff --git a/osu.Framework/Platform/MacOS/MacOSClipboard.cs b/osu.Framework/Platform/MacOS/MacOSClipboard.cs index aeaf575ebc..07d08d9276 100644 --- a/osu.Framework/Platform/MacOS/MacOSClipboard.cs +++ b/osu.Framework/Platform/MacOS/MacOSClipboard.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Platform.MacOS.Native; using SixLabors.ImageSharp; diff --git a/osu.Framework/Platform/MacOS/MacOSReadableKeyCombinationProvider.cs b/osu.Framework/Platform/MacOS/MacOSReadableKeyCombinationProvider.cs index 20362c33ee..cf118531a0 100644 --- a/osu.Framework/Platform/MacOS/MacOSReadableKeyCombinationProvider.cs +++ b/osu.Framework/Platform/MacOS/MacOSReadableKeyCombinationProvider.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Input.Bindings; using osu.Framework.Platform.SDL2; using SDL2; diff --git a/osu.Framework/Platform/MacOS/Native/Class.cs b/osu.Framework/Platform/MacOS/Native/Class.cs index 2d6ce3e4f9..4cd0784ab6 100644 --- a/osu.Framework/Platform/MacOS/Native/Class.cs +++ b/osu.Framework/Platform/MacOS/Native/Class.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.InteropServices; diff --git a/osu.Framework/Platform/MacOS/Native/NSArray.cs b/osu.Framework/Platform/MacOS/Native/NSArray.cs index db3d9ca41e..6e7c62f83e 100644 --- a/osu.Framework/Platform/MacOS/Native/NSArray.cs +++ b/osu.Framework/Platform/MacOS/Native/NSArray.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Platform.MacOS.Native diff --git a/osu.Framework/Platform/MacOS/Native/NSData.cs b/osu.Framework/Platform/MacOS/Native/NSData.cs index 3e1a3b4e4b..16793c152a 100644 --- a/osu.Framework/Platform/MacOS/Native/NSData.cs +++ b/osu.Framework/Platform/MacOS/Native/NSData.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.InteropServices; diff --git a/osu.Framework/Platform/MacOS/Native/NSDictionary.cs b/osu.Framework/Platform/MacOS/Native/NSDictionary.cs index 5e819602b8..095761c95f 100644 --- a/osu.Framework/Platform/MacOS/Native/NSDictionary.cs +++ b/osu.Framework/Platform/MacOS/Native/NSDictionary.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Platform.MacOS.Native diff --git a/osu.Framework/Platform/MacOS/Native/NSNotificationCenter.cs b/osu.Framework/Platform/MacOS/Native/NSNotificationCenter.cs index 6a517c6f80..e7e6206b37 100644 --- a/osu.Framework/Platform/MacOS/Native/NSNotificationCenter.cs +++ b/osu.Framework/Platform/MacOS/Native/NSNotificationCenter.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Platform.MacOS.Native diff --git a/osu.Framework/Platform/MacOS/Native/NSPasteboard.cs b/osu.Framework/Platform/MacOS/Native/NSPasteboard.cs index c16c072758..cd2bf18345 100644 --- a/osu.Framework/Platform/MacOS/Native/NSPasteboard.cs +++ b/osu.Framework/Platform/MacOS/Native/NSPasteboard.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; namespace osu.Framework.Platform.MacOS.Native diff --git a/osu.Framework/Platform/MacOS/Native/NSStringEncoding.cs b/osu.Framework/Platform/MacOS/Native/NSStringEncoding.cs index 82faffc2ee..2c933d7543 100644 --- a/osu.Framework/Platform/MacOS/Native/NSStringEncoding.cs +++ b/osu.Framework/Platform/MacOS/Native/NSStringEncoding.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Platform.MacOS.Native { public enum NSStringEncoding : uint diff --git a/osu.Framework/Platform/MacOS/Native/Selector.cs b/osu.Framework/Platform/MacOS/Native/Selector.cs index 4be2f21147..286a1171da 100644 --- a/osu.Framework/Platform/MacOS/Native/Selector.cs +++ b/osu.Framework/Platform/MacOS/Native/Selector.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.InteropServices; diff --git a/osu.Framework/Platform/MonoPInvokeCallbackAttribute.cs b/osu.Framework/Platform/MonoPInvokeCallbackAttribute.cs index 6269d22110..060075a8b6 100644 --- a/osu.Framework/Platform/MonoPInvokeCallbackAttribute.cs +++ b/osu.Framework/Platform/MonoPInvokeCallbackAttribute.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.CompilerServices; diff --git a/osu.Framework/Platform/SDL2/SDL2ReadableKeyCombinationProvider.cs b/osu.Framework/Platform/SDL2/SDL2ReadableKeyCombinationProvider.cs index 855688f4a5..538dbf9b29 100644 --- a/osu.Framework/Platform/SDL2/SDL2ReadableKeyCombinationProvider.cs +++ b/osu.Framework/Platform/SDL2/SDL2ReadableKeyCombinationProvider.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Globalization; using osu.Framework.Input; using osu.Framework.Input.Bindings; diff --git a/osu.Framework/Platform/SDL2/SDL2Structs.cs b/osu.Framework/Platform/SDL2/SDL2Structs.cs index 4950ee8222..32c7ffaf9d 100644 --- a/osu.Framework/Platform/SDL2/SDL2Structs.cs +++ b/osu.Framework/Platform/SDL2/SDL2Structs.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Runtime.InteropServices; using SDL2; diff --git a/osu.Framework/Platform/ThreadRunner.cs b/osu.Framework/Platform/ThreadRunner.cs index 6425c026ec..a0602abfc9 100644 --- a/osu.Framework/Platform/ThreadRunner.cs +++ b/osu.Framework/Platform/ThreadRunner.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. diff --git a/osu.Framework/Properties/AssemblyInfo.cs b/osu.Framework/Properties/AssemblyInfo.cs index eaf0f98990..fd5c8270a2 100644 --- a/osu.Framework/Properties/AssemblyInfo.cs +++ b/osu.Framework/Properties/AssemblyInfo.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Runtime.CompilerServices; using System.Reflection.Metadata; using osu.Framework.Testing; diff --git a/osu.Framework/RuntimeInfo.cs b/osu.Framework/RuntimeInfo.cs index f583832720..96ba36aebd 100644 --- a/osu.Framework/RuntimeInfo.cs +++ b/osu.Framework/RuntimeInfo.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Diagnostics; using System.Reflection; diff --git a/osu.Framework/Screens/Screen.cs b/osu.Framework/Screens/Screen.cs index a131551326..41a069f583 100644 --- a/osu.Framework/Screens/Screen.cs +++ b/osu.Framework/Screens/Screen.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -20,7 +18,7 @@ public partial class Screen : CompositeDrawable, IScreen public sealed override bool RemoveWhenNotAlive => false; [Resolved] - protected Game Game { get; private set; } + protected Game Game { get; private set; } = null!; public Screen() { diff --git a/osu.Framework/Screens/ScreenExitEvent.cs b/osu.Framework/Screens/ScreenExitEvent.cs index 20767049ff..dd8cb697be 100644 --- a/osu.Framework/Screens/ScreenExitEvent.cs +++ b/osu.Framework/Screens/ScreenExitEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Screens { /// diff --git a/osu.Framework/Screens/ScreenTransitionEvent.cs b/osu.Framework/Screens/ScreenTransitionEvent.cs index 55992f7480..e2d4309a19 100644 --- a/osu.Framework/Screens/ScreenTransitionEvent.cs +++ b/osu.Framework/Screens/ScreenTransitionEvent.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Screens { /// @@ -13,14 +11,14 @@ public class ScreenTransitionEvent /// /// The which has been transitioned from. /// - public IScreen Last { get; } + public IScreen? Last { get; } /// /// The which has been transitioned to. /// public IScreen Next { get; } - public ScreenTransitionEvent(IScreen last, IScreen next) + public ScreenTransitionEvent(IScreen? last, IScreen next) { Last = last; Next = next; diff --git a/osu.Framework/Statistics/FrameStatistics.cs b/osu.Framework/Statistics/FrameStatistics.cs index be00cc47ae..4ee6c0076d 100644 --- a/osu.Framework/Statistics/FrameStatistics.cs +++ b/osu.Framework/Statistics/FrameStatistics.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework/Statistics/IGlobalStatistic.cs b/osu.Framework/Statistics/IGlobalStatistic.cs index aeee8bd995..a6c927d483 100644 --- a/osu.Framework/Statistics/IGlobalStatistic.cs +++ b/osu.Framework/Statistics/IGlobalStatistic.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Statistics { public interface IGlobalStatistic diff --git a/osu.Framework/Statistics/TypePerformanceMonitor.cs b/osu.Framework/Statistics/TypePerformanceMonitor.cs index 8bbf88dd4a..dc00f38e14 100644 --- a/osu.Framework/Statistics/TypePerformanceMonitor.cs +++ b/osu.Framework/Statistics/TypePerformanceMonitor.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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; diff --git a/osu.Framework/Testing/DrawFrameRecordingContainer.cs b/osu.Framework/Testing/DrawFrameRecordingContainer.cs index ea0ed6d9c4..c94c02e049 100644 --- a/osu.Framework/Testing/DrawFrameRecordingContainer.cs +++ b/osu.Framework/Testing/DrawFrameRecordingContainer.cs @@ -1,11 +1,8 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using System.Diagnostics; -using JetBrains.Annotations; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; @@ -32,8 +29,8 @@ public DrawFrameRecordingContainer() }; } - [BackgroundDependencyLoader(true)] - private void load([CanBeNull] TestBrowser browser) + [BackgroundDependencyLoader] + private void load(TestBrowser? browser) { if (browser != null) { diff --git a/osu.Framework/Testing/Drawables/Sections/ToolbarRateSection.cs b/osu.Framework/Testing/Drawables/Sections/ToolbarRateSection.cs index 9f46e2efb4..be878df99e 100644 --- a/osu.Framework/Testing/Drawables/Sections/ToolbarRateSection.cs +++ b/osu.Framework/Testing/Drawables/Sections/ToolbarRateSection.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . 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.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework/Testing/Drawables/Steps/LabelStep.cs b/osu.Framework/Testing/Drawables/Steps/LabelStep.cs index 400ff0202d..c6fcd61616 100644 --- a/osu.Framework/Testing/Drawables/Steps/LabelStep.cs +++ b/osu.Framework/Testing/Drawables/Steps/LabelStep.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osuTK.Graphics; namespace osu.Framework.Testing.Drawables.Steps diff --git a/osu.Framework/Testing/Drawables/Steps/ToggleStepButton.cs b/osu.Framework/Testing/Drawables/Steps/ToggleStepButton.cs index a71956b346..5d2b7d8857 100644 --- a/osu.Framework/Testing/Drawables/Steps/ToggleStepButton.cs +++ b/osu.Framework/Testing/Drawables/Steps/ToggleStepButton.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; using osuTK.Graphics; @@ -11,7 +9,7 @@ namespace osu.Framework.Testing.Drawables.Steps { public partial class ToggleStepButton : StepButton { - private readonly Action reloadCallback; + private readonly Action? reloadCallback; private static readonly Color4 off_colour = Color4.Red; private static readonly Color4 on_colour = Color4.YellowGreen; @@ -19,7 +17,7 @@ public partial class ToggleStepButton : StepButton public override int RequiredRepetitions => 2; - public ToggleStepButton(Action reloadCallback) + public ToggleStepButton(Action? reloadCallback) { this.reloadCallback = reloadCallback; Action = clickAction; diff --git a/osu.Framework/Testing/Drawables/TestGroupButton.cs b/osu.Framework/Testing/Drawables/TestGroupButton.cs index f1f728bfc7..c5333d18e3 100644 --- a/osu.Framework/Testing/Drawables/TestGroupButton.cs +++ b/osu.Framework/Testing/Drawables/TestGroupButton.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -15,7 +13,7 @@ namespace osu.Framework.Testing.Drawables { internal partial class TestGroupButton : VisibilityContainer, IFilterable { - public IEnumerable FilterTerms => headerButton?.FilterTerms ?? Enumerable.Empty(); + public IEnumerable FilterTerms => headerButton.FilterTerms; public bool MatchingFilter { diff --git a/osu.Framework/Testing/Drawables/ToolbarSection.cs b/osu.Framework/Testing/Drawables/ToolbarSection.cs index 1e33218df3..007cfc64ff 100644 --- a/osu.Framework/Testing/Drawables/ToolbarSection.cs +++ b/osu.Framework/Testing/Drawables/ToolbarSection.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Containers; namespace osu.Framework.Testing.Drawables diff --git a/osu.Framework/Testing/GridTestScene.cs b/osu.Framework/Testing/GridTestScene.cs index b6ed202857..d351b4d3bc 100644 --- a/osu.Framework/Testing/GridTestScene.cs +++ b/osu.Framework/Testing/GridTestScene.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework/Testing/HeadlessTestAttribute.cs b/osu.Framework/Testing/HeadlessTestAttribute.cs index 40ea956be2..f15495836d 100644 --- a/osu.Framework/Testing/HeadlessTestAttribute.cs +++ b/osu.Framework/Testing/HeadlessTestAttribute.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using JetBrains.Annotations; diff --git a/osu.Framework/Testing/Input/ManualInputManager.cs b/osu.Framework/Testing/Input/ManualInputManager.cs index f5d09dbde5..4cb2d40827 100644 --- a/osu.Framework/Testing/Input/ManualInputManager.cs +++ b/osu.Framework/Testing/Input/ManualInputManager.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using System; using osu.Framework.Graphics; diff --git a/osu.Framework/Testing/Input/TestCursorContainer.cs b/osu.Framework/Testing/Input/TestCursorContainer.cs index 2cd492069b..da6dd8252a 100644 --- a/osu.Framework/Testing/Input/TestCursorContainer.cs +++ b/osu.Framework/Testing/Input/TestCursorContainer.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; diff --git a/osu.Framework/Testing/ManualInputManagerTestScene.cs b/osu.Framework/Testing/ManualInputManagerTestScene.cs index 30dc4a6a65..5155b86ad7 100644 --- a/osu.Framework/Testing/ManualInputManagerTestScene.cs +++ b/osu.Framework/Testing/ManualInputManagerTestScene.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using NUnit.Framework; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; diff --git a/osu.Framework/Testing/SetUpStepsAttribute.cs b/osu.Framework/Testing/SetUpStepsAttribute.cs index 08a50a3577..c009f7bef4 100644 --- a/osu.Framework/Testing/SetUpStepsAttribute.cs +++ b/osu.Framework/Testing/SetUpStepsAttribute.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using JetBrains.Annotations; diff --git a/osu.Framework/Testing/TearDownStepsAttribute.cs b/osu.Framework/Testing/TearDownStepsAttribute.cs index d608d36fe7..4d5738903d 100644 --- a/osu.Framework/Testing/TearDownStepsAttribute.cs +++ b/osu.Framework/Testing/TearDownStepsAttribute.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using JetBrains.Annotations; diff --git a/osu.Framework/Testing/TestBrowserConfig.cs b/osu.Framework/Testing/TestBrowserConfig.cs index e28106f3d7..aaeb47d1c7 100644 --- a/osu.Framework/Testing/TestBrowserConfig.cs +++ b/osu.Framework/Testing/TestBrowserConfig.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Configuration; using osu.Framework.Platform; diff --git a/osu.Framework/Testing/TestingExtensions.cs b/osu.Framework/Testing/TestingExtensions.cs index 7c79f430f7..60d158f622 100644 --- a/osu.Framework/Testing/TestingExtensions.cs +++ b/osu.Framework/Testing/TestingExtensions.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -14,7 +12,7 @@ public static class TestingExtensions /// /// Find all children recursively of a specific type. As this is expensive and dangerous, it should only be used for testing purposes. /// - public static IEnumerable ChildrenOfType(this Drawable drawable) + public static IEnumerable ChildrenOfType(this Drawable? drawable) { if (drawable is T match) yield return match; diff --git a/osu.Framework/Text/ICharacterGlyph.cs b/osu.Framework/Text/ICharacterGlyph.cs index 939a269b64..4860a71122 100644 --- a/osu.Framework/Text/ICharacterGlyph.cs +++ b/osu.Framework/Text/ICharacterGlyph.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - namespace osu.Framework.Text { /// diff --git a/osu.Framework/Text/ITexturedCharacterGlyph.cs b/osu.Framework/Text/ITexturedCharacterGlyph.cs index f6b6bf2ebe..204a291b21 100644 --- a/osu.Framework/Text/ITexturedCharacterGlyph.cs +++ b/osu.Framework/Text/ITexturedCharacterGlyph.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Framework.Graphics.Textures; namespace osu.Framework.Text @@ -35,6 +33,6 @@ public static class TexturedCharacterGlyphExtensions /// public static bool IsWhiteSpace(this T glyph) where T : ITexturedCharacterGlyph - => glyph.Texture == null || char.IsWhiteSpace(glyph.Character); + => char.IsWhiteSpace(glyph.Character); } } diff --git a/osu.Framework/Text/ITexturedGlyphLookupStore.cs b/osu.Framework/Text/ITexturedGlyphLookupStore.cs index 2d45f52296..13419c9544 100644 --- a/osu.Framework/Text/ITexturedGlyphLookupStore.cs +++ b/osu.Framework/Text/ITexturedGlyphLookupStore.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Threading.Tasks; namespace osu.Framework.Text @@ -15,7 +13,7 @@ public interface ITexturedGlyphLookupStore /// The name of the font. /// The character to retrieve. /// The character glyph. - ITexturedCharacterGlyph Get(string fontName, char character); + ITexturedCharacterGlyph? Get(string fontName, char character); /// /// Retrieves a glyph from the store asynchronously. @@ -23,6 +21,6 @@ public interface ITexturedGlyphLookupStore /// The name of the font. /// The character to retrieve. /// The character glyph. - Task GetAsync(string fontName, char character); + Task GetAsync(string fontName, char character); } } diff --git a/osu.Framework/Text/TextBuilder.cs b/osu.Framework/Text/TextBuilder.cs index 7adb636f48..012410812f 100644 --- a/osu.Framework/Text/TextBuilder.cs +++ b/osu.Framework/Text/TextBuilder.cs @@ -356,9 +356,9 @@ private bool tryCreateGlyph(char character, out TextBuilderGlyph glyph) private ITexturedCharacterGlyph getTexturedGlyph(char character) { return store.Get(font.FontName, character) - ?? store.Get(null, character) + ?? store.Get(string.Empty, character) ?? store.Get(font.FontName, fallbackCharacter) - ?? store.Get(null, fallbackCharacter); + ?? store.Get(string.Empty, fallbackCharacter); } } } diff --git a/osu.Framework/Text/TextBuilderGlyph.cs b/osu.Framework/Text/TextBuilderGlyph.cs index 80ffb40fa1..c1631fef6f 100644 --- a/osu.Framework/Text/TextBuilderGlyph.cs +++ b/osu.Framework/Text/TextBuilderGlyph.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Runtime.CompilerServices; using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Textures; diff --git a/osu.Framework/Text/TexturedCharacterGlyph.cs b/osu.Framework/Text/TexturedCharacterGlyph.cs index e37d533d1b..78b7f43a56 100644 --- a/osu.Framework/Text/TexturedCharacterGlyph.cs +++ b/osu.Framework/Text/TexturedCharacterGlyph.cs @@ -1,8 +1,6 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System.Runtime.CompilerServices; using osu.Framework.Graphics.Textures;