mirror of https://github.com/ppy/osu
Use common positional adjustment for note blueprints
This commit is contained in:
parent
0f755c814c
commit
fc0030a391
|
@ -49,7 +49,6 @@ protected override void Update()
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Size = HitObject.DrawSize + new Vector2(0, HitObject.Tail.DrawHeight);
|
Size = HitObject.DrawSize + new Vector2(0, HitObject.Tail.DrawHeight);
|
||||||
Position = Parent.ToLocalSpace(HitObject.ScreenSpaceDrawQuad.TopLeft);
|
|
||||||
|
|
||||||
// This is a side-effect of not matching the hitobject's anchors/origins, which is kinda hard to do
|
// This is a side-effect of not matching the hitobject's anchors/origins, which is kinda hard to do
|
||||||
// When scrolling upwards our origin is already at the top of the head note (which is the intended location),
|
// When scrolling upwards our origin is already at the top of the head note (which is the intended location),
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
|
using OpenTK;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
||||||
{
|
{
|
||||||
|
@ -16,6 +17,13 @@ public ManiaSelectionBlueprint(DrawableHitObject hitObject)
|
||||||
RelativeSizeAxes = Axes.None;
|
RelativeSizeAxes = Axes.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
Position = Parent.ToLocalSpace(HitObject.ToScreenSpace(Vector2.Zero));
|
||||||
|
}
|
||||||
|
|
||||||
public override void AdjustPosition(DragEvent dragEvent)
|
public override void AdjustPosition(DragEvent dragEvent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ protected override void Update()
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Size = HitObject.DrawSize;
|
Size = HitObject.DrawSize;
|
||||||
Position = Parent.ToLocalSpace(HitObject.ScreenSpaceDrawQuad.TopLeft);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue