mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add reverse handler button to selection box
This commit is contained in:
@ -17,10 +17,28 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
public Action<float> OnRotation;
|
||||
public Action<Vector2, Anchor> OnScale;
|
||||
public Action<Direction> OnFlip;
|
||||
public Action OnReverse;
|
||||
|
||||
public Action OperationStarted;
|
||||
public Action OperationEnded;
|
||||
|
||||
private bool canReverse;
|
||||
|
||||
/// <summary>
|
||||
/// Whether pattern reversing support should be enabled.
|
||||
/// </summary>
|
||||
public bool CanReverse
|
||||
{
|
||||
get => canReverse;
|
||||
set
|
||||
{
|
||||
if (canReverse == value) return;
|
||||
|
||||
canReverse = value;
|
||||
recreate();
|
||||
}
|
||||
}
|
||||
|
||||
private bool canRotate;
|
||||
|
||||
/// <summary>
|
||||
@ -125,6 +143,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (CanScaleX && CanScaleY) addFullScaleComponents();
|
||||
if (CanScaleY) addYScaleComponents();
|
||||
if (CanRotate) addRotationComponents();
|
||||
if (CanReverse) addButton(FontAwesome.Solid.Backward, "Reverse pattern", () => OnReverse?.Invoke());
|
||||
}
|
||||
|
||||
private void addRotationComponents()
|
||||
|
Reference in New Issue
Block a user