mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 10:02:59 +08:00
Update blueprint implementation in line with #12625.
This commit is contained in:
parent
434e63d629
commit
1516e2ffef
@ -78,10 +78,8 @@ namespace osu.Game.Skinning.Editor
|
|||||||
|
|
||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => drawable.ReceivePositionalInputAt(screenSpacePos);
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => drawable.ReceivePositionalInputAt(screenSpacePos);
|
||||||
|
|
||||||
public override Vector2 ScreenSpaceSelectionPoint => drawable.Parent.ToScreenSpace(drawable.DrawPosition);
|
public override Vector2 ScreenSpaceSelectionPoint => drawable.ScreenSpaceDrawQuad.Centre;
|
||||||
|
|
||||||
public override Quad SelectionQuad => drawable.ScreenSpaceDrawQuad;
|
public override Quad SelectionQuad => drawable.ScreenSpaceDrawQuad;
|
||||||
|
|
||||||
public override Vector2 GetInstantDelta(Vector2 screenSpacePosition) => Component.Parent.ToLocalSpace(screenSpacePosition) - drawable.DrawPosition;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
@ -107,7 +108,8 @@ namespace osu.Game.Skinning.Editor
|
|||||||
{
|
{
|
||||||
foreach (var c in SelectedBlueprints)
|
foreach (var c in SelectedBlueprints)
|
||||||
{
|
{
|
||||||
((Drawable)c.Item).Position += moveEvent.InstantDelta;
|
Drawable drawable = (Drawable)c.Item;
|
||||||
|
drawable.Position += drawable.ScreenSpaceDeltaToParentSpace(moveEvent.ScreenSpaceDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user