Skip to content

Commit

Permalink
Remove nullable disable annotation in the settings namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed May 9, 2023
1 parent 516d007 commit 14dab6c
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 27 deletions.
4 changes: 1 addition & 3 deletions osu.Game.Rulesets.Karaoke/Screens/Settings/Header.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Bindables;
Expand All @@ -25,7 +23,7 @@ public partial class Header : Container
public const float HEIGHT = 75;

[Resolved]
private KaraokeSettingsColourProvider colourProvider { get; set; }
private KaraokeSettingsColourProvider colourProvider { get; set; } = null!;

private readonly Box background;
private readonly KaraokeConfigHeaderTitle title;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Extensions.Color4Extensions;
Expand Down Expand Up @@ -31,7 +29,7 @@ public partial class KaraokeSettings : OsuScreen
private Bindable<SettingsSection> selectedSection = new();

[Cached]
private Bindable<SettingsSubsection> selectedSubsection = new();
private Bindable<SettingsSubsection?> selectedSubsection = new();

private readonly KaraokeConfigWaveContainer waves;
private readonly Box background;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System;
using osu.Game.Overlays.Settings;
using osu.Game.Rulesets.Karaoke.Screens.Settings.Sections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Allocation;
Expand All @@ -25,7 +23,7 @@ public partial class KaraokeSettingsPanel : SettingsPanel
{
public new const float WIDTH = 300;

private Box hoverBackground;
private Box hoverBackground = null!;

protected override IEnumerable<SettingsSection> CreateSections() => new SettingsSection[]
{
Expand Down Expand Up @@ -75,7 +73,7 @@ public void ScrollToSection(SettingsSection settingsSection)
public IReadOnlyList<SettingsSection> Sections => SectionsContainer.Children;

[BackgroundDependencyLoader]
private void load(KaraokeSettingsColourProvider colourProvider, Bindable<SettingsSection> selectedSection, Bindable<SettingsSubsection> selectedSubsection)
private void load(KaraokeSettingsColourProvider colourProvider, Bindable<SettingsSection> selectedSection, Bindable<SettingsSubsection?> selectedSubsection)
{
initialSelectionContainer();
initialContentContainer();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Input.Events;
Expand All @@ -15,10 +13,10 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Settings;
public abstract partial class KaraokeSettingsSubsection : SettingsSubsection
{
[Resolved]
protected KaraokeRulesetConfigManager Config { get; private set; }
protected KaraokeRulesetConfigManager Config { get; private set; } = null!;

[Resolved]
private Bindable<SettingsSubsection> selectedSubsection { get; set; }
private Bindable<SettingsSubsection?> selectedSubsection { get; set; } = null!;

public virtual SettingsSubsectionPreview CreatePreview() => new UnderConstructionPreview();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Framework.Allocation;
using osu.Framework.Development;
using osu.Framework.Graphics;
Expand Down
4 changes: 1 addition & 3 deletions osu.Game.Rulesets.Karaoke/Screens/Settings/SettingsFont.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Extensions;
Expand Down Expand Up @@ -32,7 +30,7 @@ private partial class FontSelectionButton : CompositeDrawable, IHasCurrentValue<
private const float height = 30;

private readonly BindableWithCurrent<FontUsage> current = new();
private BindableFontUsage bindableFontUsage;
private BindableFontUsage? bindableFontUsage;

private readonly GridContainer grid;
private readonly SettingsButton fontButton;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Globalization;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL 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.Allocation;
Expand Down

0 comments on commit 14dab6c

Please sign in to comment.