1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Make flipping reflect across the axes of the selection box

This commit is contained in:
aitani9 2021-07-01 15:38:38 -07:00
parent c5c1fe00f6
commit 9b0fa6d3fc

View File

@ -127,6 +127,7 @@ namespace osu.Game.Skinning.Editor
public override bool HandleFlip(Direction direction)
{
var selectionQuad = getSelectionQuad();
Vector2 scaleFactor = direction == Direction.Horizontal ? new Vector2(-1, 1) : new Vector2(1, -1);
foreach (var b in SelectedBlueprints)
{
@ -136,10 +137,8 @@ namespace osu.Game.Skinning.Editor
updateDrawablePosition(drawableItem, flippedPosition);
drawableItem.Scale *= new Vector2(
direction == Direction.Horizontal ? -1 : 1,
direction == Direction.Vertical ? -1 : 1
);
drawableItem.Scale *= scaleFactor;
drawableItem.Rotation -= drawableItem.Rotation % 180 * 2;
}
return true;