Move placement movement event to BlueprintContainer

This commit is contained in:
smoogipoo
2019-10-03 16:14:42 +09:00
parent cbdf42cd7b
commit 652acac87f
7 changed files with 48 additions and 40 deletions

View File

@ -19,14 +19,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles
InternalChild = new HitCirclePiece(HitObject);
}
protected override void LoadComplete()
{
base.LoadComplete();
// Fixes a 1-frame position discrepancy due to the first mouse move event happening in the next frame
HitObject.Position = Parent?.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position) ?? Vector2.Zero;
}
protected override bool OnClick(ClickEvent e)
{
HitObject.StartTime = EditorClock.CurrentTime;
@ -34,10 +26,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles
return true;
}
protected override bool OnMouseMove(MouseMoveEvent e)
public override void UpdatePosition(Vector2 screenSpacePosition)
{
HitObject.Position = e.MousePosition;
return true;
HitObject.Position = ToLocalSpace(screenSpacePosition);
}
}
}