mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 05:37:18 +09:00
Revert "stop component transform when skineditor is hidden"
This reverts commit 48ffd6aeb5c131a120a9c82e889348ebf3d21dfb.
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;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -26,17 +25,8 @@ namespace osu.Game.Skinning.Editor
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private SkinEditor skinEditor { get; set; }
|
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)
|
public override bool HandleRotation(float angle)
|
||||||
{
|
{
|
||||||
if (!allowHandling)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (SelectedBlueprints.Count == 1)
|
if (SelectedBlueprints.Count == 1)
|
||||||
{
|
{
|
||||||
// for single items, rotate around the origin rather than the selection centre.
|
// 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)
|
public override bool HandleScale(Vector2 scale, Anchor anchor)
|
||||||
{
|
{
|
||||||
if (!allowHandling)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// convert scale to screen space
|
// convert scale to screen space
|
||||||
scale = ToScreenSpace(scale) - ToScreenSpace(Vector2.Zero);
|
scale = ToScreenSpace(scale) - ToScreenSpace(Vector2.Zero);
|
||||||
|
|
||||||
@ -143,9 +130,6 @@ namespace osu.Game.Skinning.Editor
|
|||||||
|
|
||||||
public override bool HandleFlip(Direction direction, bool flipOverOrigin)
|
public override bool HandleFlip(Direction direction, bool flipOverOrigin)
|
||||||
{
|
{
|
||||||
if (!allowHandling)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var selectionQuad = getSelectionQuad();
|
var selectionQuad = getSelectionQuad();
|
||||||
Vector2 scaleFactor = direction == Direction.Horizontal ? new Vector2(-1, 1) : new Vector2(1, -1);
|
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)
|
public override bool HandleMovement(MoveSelectionEvent<ISkinnableDrawable> moveEvent)
|
||||||
{
|
{
|
||||||
if (!allowHandling)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
foreach (var c in SelectedBlueprints)
|
foreach (var c in SelectedBlueprints)
|
||||||
{
|
{
|
||||||
var item = c.Item;
|
var item = c.Item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user