mirror of
https://github.com/ppy/osu
synced 2025-04-11 03:31:46 +00:00
Merge pull request #13742 from aitani9/skin-editor-flipping-reflect
Make flipping in the skin editor reflect across the axes of the selection box
This commit is contained in:
commit
f37e5bdab8
@ -127,6 +127,7 @@ namespace osu.Game.Skinning.Editor
|
|||||||
public override bool HandleFlip(Direction direction)
|
public override bool HandleFlip(Direction direction)
|
||||||
{
|
{
|
||||||
var selectionQuad = getSelectionQuad();
|
var selectionQuad = getSelectionQuad();
|
||||||
|
Vector2 scaleFactor = direction == Direction.Horizontal ? new Vector2(-1, 1) : new Vector2(1, -1);
|
||||||
|
|
||||||
foreach (var b in SelectedBlueprints)
|
foreach (var b in SelectedBlueprints)
|
||||||
{
|
{
|
||||||
@ -136,10 +137,8 @@ namespace osu.Game.Skinning.Editor
|
|||||||
|
|
||||||
updateDrawablePosition(drawableItem, flippedPosition);
|
updateDrawablePosition(drawableItem, flippedPosition);
|
||||||
|
|
||||||
drawableItem.Scale *= new Vector2(
|
drawableItem.Scale *= scaleFactor;
|
||||||
direction == Direction.Horizontal ? -1 : 1,
|
drawableItem.Rotation -= drawableItem.Rotation % 180 * 2;
|
||||||
direction == Direction.Vertical ? -1 : 1
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user