mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:36:10 +08:00
Give control over screen space conversion to DrawableHitObject
This commit is contained in:
parent
2f1063c5c0
commit
a303bf71cf
@ -167,7 +167,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
public Drawable ProxiedLayer => initialCircle.ApproachCircle;
|
public Drawable ProxiedLayer => initialCircle.ApproachCircle;
|
||||||
|
|
||||||
public override Vector2 SelectionPoint => body.Position;
|
public override Vector2 SelectionPoint => ToScreenSpace(body.Position);
|
||||||
public override Quad SelectionQuad => body.PathDrawQuad;
|
public override Quad SelectionQuad => body.PathDrawQuad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,8 +115,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
|
|||||||
if (!obj.IsAlive || !obj.IsPresent)
|
if (!obj.IsAlive || !obj.IsPresent)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var objectPosition = obj.ToScreenSpace(obj.SelectionPoint);
|
if (ScreenSpaceDrawQuad.Contains(obj.SelectionPoint))
|
||||||
if (ScreenSpaceDrawQuad.Contains(objectPosition))
|
|
||||||
capturedHitObjects.Add(obj);
|
capturedHitObjects.Add(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,12 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The local point that causes this <see cref="DrawableHitObject"/> to be selected in the Editor.
|
/// The screen-space point that causes this <see cref="DrawableHitObject"/> to be selected in the Editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Vector2 SelectionPoint => DrawSize / 2f;
|
public virtual Vector2 SelectionPoint => ScreenSpaceDrawQuad.Centre;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The local rectangle that outlines this <see cref="DrawableHitObject"/> for selections in the Editor.
|
/// The screen-space quad that outlines this <see cref="DrawableHitObject"/> for selections in the Editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Quad SelectionQuad => ScreenSpaceDrawQuad;
|
public virtual Quad SelectionQuad => ScreenSpaceDrawQuad;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user