1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:17:27 +08:00

Enable NRT in SelectionBox

This commit is contained in:
Bartłomiej Dach 2023-06-27 22:01:44 +02:00
parent c6d952abe3
commit ad3a470eaf
No known key found for this signature in database

View File

@ -1,8 +1,6 @@
// 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 osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -24,17 +22,17 @@ namespace osu.Game.Screens.Edit.Compose.Components
private const float button_padding = 5; private const float button_padding = 5;
public Func<float, bool> OnRotation; public Func<float, bool>? OnRotation;
public Func<Vector2, Anchor, bool> OnScale; public Func<Vector2, Anchor, bool>? OnScale;
public Func<Direction, bool, bool> OnFlip; public Func<Direction, bool, bool>? OnFlip;
public Func<bool> OnReverse; public Func<bool>? OnReverse;
public Action OperationStarted; public Action? OperationStarted;
public Action OperationEnded; public Action? OperationEnded;
private SelectionBoxButton reverseButton; private SelectionBoxButton? reverseButton;
private SelectionBoxButton rotateClockwiseButton; private SelectionBoxButton? rotateClockwiseButton;
private SelectionBoxButton rotateCounterClockwiseButton; private SelectionBoxButton? rotateCounterClockwiseButton;
private bool canReverse; private bool canReverse;
@ -138,7 +136,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
} }
} }
private string text; private string text = string.Empty;
public string Text public string Text
{ {
@ -154,13 +152,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
} }
} }
private SelectionBoxDragHandleContainer dragHandles; private SelectionBoxDragHandleContainer dragHandles = null!;
private FillFlowContainer buttons; private FillFlowContainer buttons = null!;
private OsuSpriteText selectionDetailsText; private OsuSpriteText? selectionDetailsText;
[Resolved] [Resolved]
private OsuColour colours { get; set; } private OsuColour colours { get; set; } = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() => recreate(); private void load() => recreate();