1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 09:27:34 +08:00

Apply NRT to SelectionBoxRotationHandle.

This commit is contained in:
Dean Herbert 2023-07-26 14:03:12 +09:00
parent a201152b04
commit 39c2bb240b

View File

@ -1,10 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
#nullable disable
using System; using System;
using JetBrains.Annotations;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.EnumExtensions; using osu.Framework.Extensions.EnumExtensions;
@ -16,25 +13,24 @@ using osu.Framework.Localisation;
using osu.Game.Localisation; using osu.Game.Localisation;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using Key = osuTK.Input.Key; using osuTK.Input;
namespace osu.Game.Screens.Edit.Compose.Components namespace osu.Game.Screens.Edit.Compose.Components
{ {
public partial class SelectionBoxRotationHandle : SelectionBoxDragHandle, IHasTooltip public partial class SelectionBoxRotationHandle : SelectionBoxDragHandle, IHasTooltip
{ {
[CanBeNull] public SelectionRotationHandler? RotationHandler { get; init; }
public SelectionRotationHandler RotationHandler { get; init; }
public LocalisableString TooltipText { get; private set; } public LocalisableString TooltipText { get; private set; }
private SpriteIcon icon; private SpriteIcon icon = null!;
private const float snap_step = 15; private const float snap_step = 15;
private readonly Bindable<float?> cumulativeRotation = new Bindable<float?>(); private readonly Bindable<float?> cumulativeRotation = new Bindable<float?>();
[Resolved] [Resolved]
private SelectionBox selectionBox { get; set; } private SelectionBox selectionBox { get; set; } = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()