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

Fix single frame glitching in skin editor

https://github.com/ppy/osu/pull/28257#discussion_r1606999574
This commit is contained in:
Dean Herbert 2024-05-21 14:36:11 +08:00
parent 3b86da443b
commit e740b8bcc3
No known key found for this signature in database

View File

@ -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)