From 2fa52de87a07a7bbdbbde850ccd47d5722d1cc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=C3=AAn=20Minh=20H=E1=BB=93?= Date: Thu, 25 Jan 2024 15:52:57 +0700 Subject: [PATCH] Fix formatting --- .../Editor/TestScenePreciseRotation.cs | 8 ++++---- osu.Game.Rulesets.Osu/Edit/OsuSelectionRotationHandler.cs | 3 ++- .../Edit/Components/RadioButtons/EditorRadioButton.cs | 3 --- .../Screens/Edit/Components/RadioButtons/RadioButton.cs | 1 + 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Osu.Tests/Editor/TestScenePreciseRotation.cs b/osu.Game.Rulesets.Osu.Tests/Editor/TestScenePreciseRotation.cs index 67283f40da..30e0dbbf2e 100644 --- a/osu.Game.Rulesets.Osu.Tests/Editor/TestScenePreciseRotation.cs +++ b/osu.Game.Rulesets.Osu.Tests/Editor/TestScenePreciseRotation.cs @@ -46,8 +46,8 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor { var popover = getPopover(); var buttons = popover.ChildrenOfType(); - return buttons.Any(btn => btn.Text == "Selection centre" && btn.Enabled.Value is false) && - buttons.Any(btn => btn.Text == "Playfield centre" && btn.Enabled.Value is true); + return buttons.Any(btn => btn.Text == "Selection centre" && !btn.Enabled.Value) + && buttons.Any(btn => btn.Text == "Playfield centre" && btn.Enabled.Value); }); AddStep("press rotate hotkey", () => { @@ -73,8 +73,8 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor { var popover = getPopover(); var buttons = popover.ChildrenOfType(); - return buttons.Any(btn => btn.Text == "Selection centre" && btn.Enabled.Value is true) && - buttons.Any(btn => btn.Text == "Playfield centre" && btn.Enabled.Value is true); + return buttons.Any(btn => btn.Text == "Selection centre" && btn.Enabled.Value) + && buttons.Any(btn => btn.Text == "Playfield centre" && btn.Enabled.Value); }); AddStep("press rotate hotkey", () => { diff --git a/osu.Game.Rulesets.Osu/Edit/OsuSelectionRotationHandler.cs b/osu.Game.Rulesets.Osu/Edit/OsuSelectionRotationHandler.cs index 0ce78e4f61..cd01fc9f4d 100644 --- a/osu.Game.Rulesets.Osu/Edit/OsuSelectionRotationHandler.cs +++ b/osu.Game.Rulesets.Osu/Edit/OsuSelectionRotationHandler.cs @@ -19,7 +19,8 @@ namespace osu.Game.Rulesets.Osu.Edit { public partial class OsuSelectionRotationHandler : SelectionRotationHandler { - public BindableBool CanRotatePlayfieldOrigin { get; private set; } = new(); + public BindableBool CanRotatePlayfieldOrigin { get; private set; } = new BindableBool(); + [Resolved] private IEditorChangeHandler? changeHandler { get; set; } diff --git a/osu.Game/Screens/Edit/Components/RadioButtons/EditorRadioButton.cs b/osu.Game/Screens/Edit/Components/RadioButtons/EditorRadioButton.cs index 601548fadd..9d1f87e1e0 100644 --- a/osu.Game/Screens/Edit/Components/RadioButtons/EditorRadioButton.cs +++ b/osu.Game/Screens/Edit/Components/RadioButtons/EditorRadioButton.cs @@ -33,9 +33,6 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons private Drawable icon = null!; - [Resolved] - private EditorBeatmap? editorBeatmap { get; set; } - public EditorRadioButton(RadioButton button) { Button = button; diff --git a/osu.Game/Screens/Edit/Components/RadioButtons/RadioButton.cs b/osu.Game/Screens/Edit/Components/RadioButtons/RadioButton.cs index 1b47c028ab..2d1416c9c6 100644 --- a/osu.Game/Screens/Edit/Components/RadioButtons/RadioButton.cs +++ b/osu.Game/Screens/Edit/Components/RadioButtons/RadioButton.cs @@ -20,6 +20,7 @@ namespace osu.Game.Screens.Edit.Components.RadioButtons /// Tooltip text that will be shown on hover if button is enabled. /// public LocalisableString TooltipTextWhenEnabled { get; set; } = string.Empty; + /// /// Tooltip text that will be shown on hover if button is disabled. ///