1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 06:27:18 +08:00

change names

This commit is contained in:
Wleter 2023-08-29 17:25:52 +02:00
parent 3c575516ab
commit d56ab0fe9a
3 changed files with 15 additions and 14 deletions

View File

@ -73,18 +73,20 @@ namespace osu.Game.Overlays.SkinEditor
adjustedRect.Width += scale.X;
adjustedRect.Height += scale.Y;
if (adjustedRect.Width < 0)
{
SelectionBox.ScaleHandlesFlip(Direction.Horizontal);
HandleFlip(Direction.Horizontal, false);
}
if (adjustedRect.Height < 0)
{
SelectionBox.ScaleHandlesFlip(Direction.Vertical);
HandleFlip(Direction.Vertical, false);
}
if (adjustedRect.Width < 0 || adjustedRect.Height < 0)
{
if (adjustedRect.Width < 0)
{
SelectionBox.FlipScaleHandles(Direction.Horizontal);
HandleFlip(Direction.Horizontal, false);
}
if (adjustedRect.Height < 0)
{
SelectionBox.FlipScaleHandles(Direction.Vertical);
HandleFlip(Direction.Vertical, false);
}
return true;
}
// scale adjust applied to each individual item should match that of the quad itself.
var scaledDelta = new Vector2(
@ -113,9 +115,8 @@ namespace osu.Game.Overlays.SkinEditor
updateDrawablePosition(drawableItem, newPositionInAdjusted);
if (Precision.AlmostEquals(MathF.Abs(drawableItem.Rotation) % 180, 90))
{
scaledDelta = new Vector2(scaledDelta.Y, scaledDelta.X);
}
drawableItem.Scale *= scaledDelta;
}

View File

@ -307,7 +307,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
return button;
}
public void ScaleHandlesFlip(Direction direction) => dragHandles.ScaleHandlesFlip(direction);
public void FlipScaleHandles(Direction direction) => dragHandles.FlipScaleHandles(direction);
private void addScaleHandle(Anchor anchor)
{

View File

@ -70,7 +70,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
allDragHandles.Add(handle);
}
public void ScaleHandlesFlip(Direction direction)
public void FlipScaleHandles(Direction direction)
{
foreach (var handle in scaleHandles)
{