mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09:00
add fields for path's end location
This commit is contained in:
parent
ceedc3f934
commit
38bb7ac0c7
@ -22,6 +22,10 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Vector2 PathStartLocation => body.PathOffset;
|
public Vector2 PathStartLocation => body.PathOffset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Offset in absolute (local) coordinates from the end of the curve.
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 PathEndLocation => body.PathEndOffset;
|
||||||
public SliderBodyPiece()
|
public SliderBodyPiece()
|
||||||
{
|
{
|
||||||
InternalChild = body = new ManualSliderBody
|
InternalChild = body = new ManualSliderBody
|
||||||
|
@ -31,6 +31,12 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Vector2 PathOffset => path.PositionInBoundingBox(path.Vertices[0]);
|
public virtual Vector2 PathOffset => path.PositionInBoundingBox(path.Vertices[0]);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Offset in absolute coordinates from the end of the curve.
|
||||||
|
/// </summary>
|
||||||
|
public virtual Vector2 PathEndOffset => path.PositionInBoundingBox(path.Vertices[^1]);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to colour the path.
|
/// Used to colour the path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -43,6 +43,8 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
|
|
||||||
public override Vector2 PathOffset => snakedPathOffset;
|
public override Vector2 PathOffset => snakedPathOffset;
|
||||||
|
|
||||||
|
public override Vector2 PathEndOffset => snakedPathEndOffset;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The top-left position of the path when fully snaked.
|
/// The top-left position of the path when fully snaked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -53,6 +55,11 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private Vector2 snakedPathOffset;
|
private Vector2 snakedPathOffset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The offset of the end of path from <see cref="snakedPosition"/> when fully snaked.
|
||||||
|
/// </summary>
|
||||||
|
private Vector2 snakedPathEndOffset;
|
||||||
|
|
||||||
private DrawableSlider drawableSlider = null!;
|
private DrawableSlider drawableSlider = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -109,6 +116,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
|
|
||||||
snakedPosition = Path.PositionInBoundingBox(Vector2.Zero);
|
snakedPosition = Path.PositionInBoundingBox(Vector2.Zero);
|
||||||
snakedPathOffset = Path.PositionInBoundingBox(Path.Vertices[0]);
|
snakedPathOffset = Path.PositionInBoundingBox(Path.Vertices[0]);
|
||||||
|
snakedPathEndOffset = Path.PositionInBoundingBox(Path.Vertices[^1]);
|
||||||
|
|
||||||
double lastSnakedStart = SnakedStart ?? 0;
|
double lastSnakedStart = SnakedStart ?? 0;
|
||||||
double lastSnakedEnd = SnakedEnd ?? 0;
|
double lastSnakedEnd = SnakedEnd ?? 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user