1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Apply required nullability changes

This commit is contained in:
Dean Herbert 2023-06-22 15:58:05 +09:00
parent 23aa1752c3
commit 3585c3f1d5
5 changed files with 9 additions and 5 deletions

View File

@ -244,7 +244,7 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
MenuItem? item = visualiser.ContextMenuItems.FirstOrDefault(menuItem => menuItem.Text.Value == contextMenuText);
item?.Action?.Value();
item?.Action.Value?.Invoke();
});
}
}

View File

@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
back = rim;
}
if (target != null)
if (target != null && back != null)
{
const float scale_amount = 0.05f;
const float alpha_amount = 0.5f;

View File

@ -213,7 +213,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddStep("attempt seek", () =>
{
InputManager.MoveMouseTo(getSongProgress());
InputManager.MoveMouseTo(getSongProgress().AsNonNull());
InputManager.Click(MouseButton.Left);
});

View File

@ -825,6 +825,8 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep("Click on a filtered difficulty", () =>
{
Debug.Assert(filteredIcon != null);
InputManager.MoveMouseTo(filteredIcon);
InputManager.Click(MouseButton.Left);
@ -918,6 +920,8 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep("Click on a difficulty", () =>
{
Debug.Assert(difficultyIcon != null);
InputManager.MoveMouseTo(difficultyIcon);
InputManager.Click(MouseButton.Left);

View File

@ -218,7 +218,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("dismiss mod customisation via toggle", () =>
{
InputManager.MoveMouseTo(modSelectOverlay.CustomisationButton);
InputManager.MoveMouseTo(modSelectOverlay.CustomisationButton.AsNonNull());
InputManager.Click(MouseButton.Left);
});
assertCustomisationToggleState(disabled: false, active: false);
@ -558,7 +558,7 @@ namespace osu.Game.Tests.Visual.UserInterface
void navigateAndClick<T>() where T : Drawable
{
InputManager.MoveMouseTo(modSelectOverlay.ChildrenOfType<T>().FirstOrDefault());
InputManager.MoveMouseTo(modSelectOverlay.ChildrenOfType<T>().First());
InputManager.Click(MouseButton.Left);
}
}