mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Remove now unnecessary Apply() method
This commit is contained in:
parent
72beddaadc
commit
882d54a8f8
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// <summary>
|
||||
/// The <see cref="DrawableHitObject"/> which this <see cref="HitObjectSelectionBlueprint"/> applies to.
|
||||
/// </summary>
|
||||
public virtual DrawableHitObject DrawableObject { get; private set; }
|
||||
public DrawableHitObject DrawableObject { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the blueprint should be shown even when the <see cref="DrawableObject"/> is not alive.
|
||||
@ -28,24 +28,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
}
|
||||
|
||||
protected override void LoadAsyncComplete()
|
||||
{
|
||||
// Must be done before base.LoadAsyncComplete() as this may affect children.
|
||||
Apply(DrawableObject);
|
||||
|
||||
base.LoadAsyncComplete();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies a <see cref="DrawableHitObject"/> to this <see cref="HitObjectSelectionBlueprint"/>.
|
||||
/// The represented <see cref="HitObject"/> model does not change.
|
||||
/// </summary>
|
||||
/// <param name="drawableObject">The new <see cref="DrawableHitObject"/>.</param>
|
||||
public virtual void Apply(DrawableHitObject drawableObject)
|
||||
{
|
||||
DrawableObject = drawableObject;
|
||||
}
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => DrawableObject.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
public override Vector2 ScreenSpaceSelectionPoint => DrawableObject.ScreenSpaceDrawQuad.Centre;
|
||||
|
@ -245,7 +245,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (drawable == null)
|
||||
return null;
|
||||
|
||||
return CreateHitObjectBlueprintFor(item).With(b => b.Apply(drawable));
|
||||
return CreateHitObjectBlueprintFor(item).With(b => b.DrawableObject = drawable);
|
||||
}
|
||||
|
||||
public virtual HitObjectSelectionBlueprint CreateHitObjectBlueprintFor(HitObject hitObject) => null;
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
Add(blueprint.With(d =>
|
||||
{
|
||||
d.Apply(drawableObject);
|
||||
d.DrawableObject = drawableObject;
|
||||
d.Depth = float.MinValue;
|
||||
d.Select();
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user