mirror of https://github.com/ppy/osu
Fix selection blueprints not respecting stacking
This commit is contained in:
parent
50b674249b
commit
96649e0a6a
|
@ -52,6 +52,13 @@ public void TestMoveAfterApplyingDefaults()
|
||||||
AddAssert("blueprint positioned over hitobject", () => blueprint.CirclePiece.Position == hitCircle.Position);
|
AddAssert("blueprint positioned over hitobject", () => blueprint.CirclePiece.Position == hitCircle.Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestStackedHitObject()
|
||||||
|
{
|
||||||
|
AddStep("set stacking", () => hitCircle.StackHeight = 5);
|
||||||
|
AddAssert("blueprint positioned over hitobject", () => blueprint.CirclePiece.Position == hitCircle.StackedPosition);
|
||||||
|
}
|
||||||
|
|
||||||
private class TestBlueprint : HitCircleSelectionBlueprint
|
private class TestBlueprint : HitCircleSelectionBlueprint
|
||||||
{
|
{
|
||||||
public new HitCirclePiece CirclePiece => base.CirclePiece;
|
public new HitCirclePiece CirclePiece => base.CirclePiece;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public abstract class BlueprintPiece<T> : CompositeDrawable
|
||||||
/// <param name="hitObject">The <see cref="OsuHitObject"/> to reference properties from.</param>
|
/// <param name="hitObject">The <see cref="OsuHitObject"/> to reference properties from.</param>
|
||||||
public virtual void UpdateFrom(T hitObject)
|
public virtual void UpdateFrom(T hitObject)
|
||||||
{
|
{
|
||||||
Position = hitObject.Position;
|
Position = hitObject.StackedPosition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue