mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 04:32:57 +08:00
Fix single frame glitching in skin editor
https://github.com/ppy/osu/pull/28257#discussion_r1606999574
This commit is contained in:
parent
3b86da443b
commit
e740b8bcc3
@ -455,9 +455,10 @@ namespace osu.Game.Overlays.SkinEditor
|
||||
checkOrigin(Anchor.BottomCentre);
|
||||
checkOrigin(Anchor.BottomRight);
|
||||
|
||||
var previousOrigin = drawable.ToParentSpace(drawable.OriginPosition);
|
||||
Vector2 offset = drawable.ToParentSpace(localOrigin.PositionOnQuad(drawable.DrawRectangle)) - drawable.ToParentSpace(drawable.Origin.PositionOnQuad(drawable.DrawRectangle));
|
||||
|
||||
drawable.Origin = localOrigin;
|
||||
drawable.Position += drawable.ToParentSpace(drawable.OriginPosition) - previousOrigin;
|
||||
drawable.Position += offset;
|
||||
}
|
||||
|
||||
private static void adjustScaleFromAnchor(ref Vector2 scale, Anchor reference)
|
||||
|
Loading…
Reference in New Issue
Block a user