1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Use common positional adjustment for note blueprints

This commit is contained in:
smoogipoo 2018-11-13 15:45:06 +09:00
parent 0f755c814c
commit fc0030a391
3 changed files with 8 additions and 2 deletions

View File

@ -49,7 +49,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
base.Update();
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
// When scrolling upwards our origin is already at the top of the head note (which is the intended location),

View File

@ -5,6 +5,7 @@ using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects.Drawables;
using OpenTK;
namespace osu.Game.Rulesets.Mania.Edit.Blueprints
{
@ -16,6 +17,13 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
RelativeSizeAxes = Axes.None;
}
protected override void Update()
{
base.Update();
Position = Parent.ToLocalSpace(HitObject.ToScreenSpace(Vector2.Zero));
}
public override void AdjustPosition(DragEvent dragEvent)
{
}

View File

@ -32,7 +32,6 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
base.Update();
Size = HitObject.DrawSize;
Position = Parent.ToLocalSpace(HitObject.ScreenSpaceDrawQuad.TopLeft);
}
}
}