mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Hide the corresponding rotation handle when holding scale handle
This commit is contained in:
@ -72,13 +72,19 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
private void updateRotationHandlesVisibility()
|
||||
{
|
||||
if (activeHandle?.IsHeld == true || activeHandle?.IsHovered == true)
|
||||
// if the active handle is a rotation handle and is held or hovered,
|
||||
// then no need to perform any updates to the rotation handles visibility.
|
||||
if (activeHandle is SelectionBoxRotationHandle && (activeHandle?.IsHeld == true || activeHandle?.IsHovered == true))
|
||||
return;
|
||||
|
||||
displayedRotationHandle?.FadeOut(SelectionBoxControl.TRANSFORM_DURATION, Easing.OutQuint);
|
||||
displayedRotationHandle = null;
|
||||
|
||||
activeHandle = allDragHandles.SingleOrDefault(h => h.IsHeld);
|
||||
// if the active handle is not a rotation handle but is held, then keep the rotation handle hidden.
|
||||
if (activeHandle?.IsHeld == true)
|
||||
return;
|
||||
|
||||
activeHandle = rotationHandles.SingleOrDefault(h => h.IsHeld || h.IsHovered);
|
||||
activeHandle ??= allDragHandles.SingleOrDefault(h => h.IsHovered);
|
||||
|
||||
if (activeHandle != null)
|
||||
|
Reference in New Issue
Block a user