mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Enable nullability
This commit is contained in:
parent
8b033bf9f7
commit
d20dc3668e
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -21,8 +19,8 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Cached]
|
[Cached]
|
||||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
private TestCommentEditor commentEditor;
|
private TestCommentEditor commentEditor = null!;
|
||||||
private TestCancellableCommentEditor cancellableCommentEditor;
|
private TestCancellableCommentEditor cancellableCommentEditor = null!;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void SetUp() => Schedule(() =>
|
public void SetUp() => Schedule(() =>
|
||||||
@ -109,7 +107,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
public new Bindable<string> Current => base.Current;
|
public new Bindable<string> Current => base.Current;
|
||||||
public new FillFlowContainer ButtonsContainer => base.ButtonsContainer;
|
public new FillFlowContainer ButtonsContainer => base.ButtonsContainer;
|
||||||
|
|
||||||
public string CommittedText { get; private set; }
|
public string? CommittedText { get; private set; }
|
||||||
|
|
||||||
public TestCommentEditor()
|
public TestCommentEditor()
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -19,7 +17,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
public abstract partial class CancellableCommentEditor : CommentEditor
|
public abstract partial class CancellableCommentEditor : CommentEditor
|
||||||
{
|
{
|
||||||
public Action OnCancel;
|
public Action? OnCancel;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -25,7 +23,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
private const int side_padding = 8;
|
private const int side_padding = 8;
|
||||||
|
|
||||||
public Action<string> OnCommit;
|
public Action<string>? OnCommit;
|
||||||
|
|
||||||
public bool IsLoading
|
public bool IsLoading
|
||||||
{
|
{
|
||||||
@ -39,11 +37,11 @@ namespace osu.Game.Overlays.Comments
|
|||||||
|
|
||||||
protected abstract LocalisableString TextBoxPlaceholder { get; }
|
protected abstract LocalisableString TextBoxPlaceholder { get; }
|
||||||
|
|
||||||
protected FillFlowContainer ButtonsContainer { get; private set; }
|
protected FillFlowContainer ButtonsContainer { get; private set; } = null!;
|
||||||
|
|
||||||
protected readonly Bindable<string> Current = new Bindable<string>();
|
protected readonly Bindable<string> Current = new Bindable<string>();
|
||||||
|
|
||||||
private CommitButton commitButton;
|
private CommitButton commitButton = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
@ -80,7 +78,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
Name = "Footer",
|
Name = @"Footer",
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 35,
|
Height = 35,
|
||||||
Padding = new MarginPadding { Horizontal = side_padding },
|
Padding = new MarginPadding { Horizontal = side_padding },
|
||||||
@ -95,7 +93,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
},
|
},
|
||||||
ButtonsContainer = new FillFlowContainer
|
ButtonsContainer = new FillFlowContainer
|
||||||
{
|
{
|
||||||
Name = "Buttons",
|
Name = @"Buttons",
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -140,7 +138,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
|
|
||||||
protected override Color4 SelectionColour => Color4.Gray;
|
protected override Color4 SelectionColour => Color4.Gray;
|
||||||
|
|
||||||
private OsuSpriteText placeholder;
|
private OsuSpriteText placeholder = null!;
|
||||||
|
|
||||||
public EditorTextBox()
|
public EditorTextBox()
|
||||||
{
|
{
|
||||||
@ -181,11 +179,11 @@ namespace osu.Game.Overlays.Comments
|
|||||||
private readonly LocalisableString text;
|
private readonly LocalisableString text;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OverlayColourProvider colourProvider { get; set; }
|
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||||
|
|
||||||
private OsuSpriteText drawableText;
|
private OsuSpriteText drawableText = null!;
|
||||||
private Box background;
|
private Box background = null!;
|
||||||
private Box blockedBackground;
|
private Box blockedBackground = null!;
|
||||||
|
|
||||||
public CommitButton(LocalisableString text)
|
public CommitButton(LocalisableString text)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user