mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Revert "stop component transform when skineditor is hidden"
This reverts commit 48ffd6aeb5
.
This commit is contained in:
parent
48ffd6aeb5
commit
36df1da57f
@ -11,7 +11,6 @@ using osu.Framework.Extensions.EnumExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -26,17 +25,8 @@ namespace osu.Game.Skinning.Editor
|
||||
[Resolved]
|
||||
private SkinEditor skinEditor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="SkinEditor"/>'s state allows selected blueprints to undergo transformations.
|
||||
/// Used to prevent operations from being performed on unloaded blueprints.
|
||||
/// </summary>
|
||||
private bool allowHandling => skinEditor.State.Value == Visibility.Visible;
|
||||
|
||||
public override bool HandleRotation(float angle)
|
||||
{
|
||||
if (!allowHandling)
|
||||
return false;
|
||||
|
||||
if (SelectedBlueprints.Count == 1)
|
||||
{
|
||||
// for single items, rotate around the origin rather than the selection centre.
|
||||
@ -63,9 +53,6 @@ namespace osu.Game.Skinning.Editor
|
||||
|
||||
public override bool HandleScale(Vector2 scale, Anchor anchor)
|
||||
{
|
||||
if (!allowHandling)
|
||||
return false;
|
||||
|
||||
// convert scale to screen space
|
||||
scale = ToScreenSpace(scale) - ToScreenSpace(Vector2.Zero);
|
||||
|
||||
@ -143,9 +130,6 @@ namespace osu.Game.Skinning.Editor
|
||||
|
||||
public override bool HandleFlip(Direction direction, bool flipOverOrigin)
|
||||
{
|
||||
if (!allowHandling)
|
||||
return false;
|
||||
|
||||
var selectionQuad = getSelectionQuad();
|
||||
Vector2 scaleFactor = direction == Direction.Horizontal ? new Vector2(-1, 1) : new Vector2(1, -1);
|
||||
|
||||
@ -166,9 +150,6 @@ namespace osu.Game.Skinning.Editor
|
||||
|
||||
public override bool HandleMovement(MoveSelectionEvent<ISkinnableDrawable> moveEvent)
|
||||
{
|
||||
if (!allowHandling)
|
||||
return false;
|
||||
|
||||
foreach (var c in SelectedBlueprints)
|
||||
{
|
||||
var item = c.Item;
|
||||
|
Loading…
Reference in New Issue
Block a user