mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:23:21 +08:00
Add [CanBeNull]
to methods returning null by default
This commit is contained in:
parent
e96814bb86
commit
eec4457473
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -94,6 +95,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// Creates a <see cref="SelectionBlueprint{T}"/> for a specific item.
|
/// Creates a <see cref="SelectionBlueprint{T}"/> for a specific item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item to create the overlay for.</param>
|
/// <param name="item">The item to create the overlay for.</param>
|
||||||
|
[CanBeNull]
|
||||||
protected virtual SelectionBlueprint<T> CreateBlueprintFor(T item) => null;
|
protected virtual SelectionBlueprint<T> CreateBlueprintFor(T item) => null;
|
||||||
|
|
||||||
protected virtual DragBox CreateDragBox(Action<RectangleF> performSelect) => new DragBox(performSelect);
|
protected virtual DragBox CreateDragBox(Action<RectangleF> performSelect) => new DragBox(performSelect);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -259,6 +260,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
return CreateHitObjectBlueprintFor(item)?.With(b => b.DrawableObject = drawable);
|
return CreateHitObjectBlueprintFor(item)?.With(b => b.DrawableObject = drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CanBeNull]
|
||||||
public virtual HitObjectSelectionBlueprint CreateHitObjectBlueprintFor(HitObject hitObject) => null;
|
public virtual HitObjectSelectionBlueprint CreateHitObjectBlueprintFor(HitObject hitObject) => null;
|
||||||
|
|
||||||
private void hitObjectAdded(HitObject obj)
|
private void hitObjectAdded(HitObject obj)
|
||||||
|
Loading…
Reference in New Issue
Block a user