From 4d9d5adbf441ecc8286ca4dc512f96063ddf19bf Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 28 Nov 2024 15:13:32 +0900 Subject: [PATCH] Rename parameter to be more clear --- .../Edit/Setup/FormBeatmapFileSelector.cs | 16 ++++++++-------- osu.Game/Screens/Edit/Setup/ResourcesSection.cs | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Edit/Setup/FormBeatmapFileSelector.cs b/osu.Game/Screens/Edit/Setup/FormBeatmapFileSelector.cs index 317ed1b903..ae368a7b7e 100644 --- a/osu.Game/Screens/Edit/Setup/FormBeatmapFileSelector.cs +++ b/osu.Game/Screens/Edit/Setup/FormBeatmapFileSelector.cs @@ -27,19 +27,19 @@ namespace osu.Game.Screens.Edit.Setup /// public partial class FormBeatmapFileSelector : FormFileSelector { - private readonly bool multipleDifficulties; + private readonly bool beatmapHasMultipleDifficulties; public readonly Bindable ApplyToAllDifficulties = new Bindable(true); - public FormBeatmapFileSelector(bool multipleDifficulties, params string[] handledExtensions) + public FormBeatmapFileSelector(bool beatmapHasMultipleDifficulties, params string[] handledExtensions) : base(handledExtensions) { - this.multipleDifficulties = multipleDifficulties; + this.beatmapHasMultipleDifficulties = beatmapHasMultipleDifficulties; } protected override FileChooserPopover CreatePopover(string[] handledExtensions, Bindable current, string? chooserPath) { - var popover = new BeatmapFileChooserPopover(handledExtensions, current, chooserPath, multipleDifficulties); + var popover = new BeatmapFileChooserPopover(handledExtensions, current, chooserPath, beatmapHasMultipleDifficulties); popover.ApplyToAllDifficulties.ValueChanged += v => { @@ -52,16 +52,16 @@ namespace osu.Game.Screens.Edit.Setup private partial class BeatmapFileChooserPopover : FileChooserPopover { - private readonly bool multipleDifficulties; + private readonly bool beatmapHasMultipleDifficulties; public readonly Bindable ApplyToAllDifficulties = new Bindable(); private Container changeScopeContainer = null!; - public BeatmapFileChooserPopover(string[] handledExtensions, Bindable current, string? chooserPath, bool multipleDifficulties) + public BeatmapFileChooserPopover(string[] handledExtensions, Bindable current, string? chooserPath, bool beatmapHasMultipleDifficulties) : base(handledExtensions, current, chooserPath) { - this.multipleDifficulties = multipleDifficulties; + this.beatmapHasMultipleDifficulties = beatmapHasMultipleDifficulties; } [BackgroundDependencyLoader] @@ -142,7 +142,7 @@ namespace osu.Game.Screens.Edit.Setup protected override void OnFileSelected(FileInfo file) { - if (multipleDifficulties) + if (beatmapHasMultipleDifficulties) changeScopeContainer.FadeIn(200, Easing.InQuint); else base.OnFileSelected(file); diff --git a/osu.Game/Screens/Edit/Setup/ResourcesSection.cs b/osu.Game/Screens/Edit/Setup/ResourcesSection.cs index 70282878e0..1ce944b5a4 100644 --- a/osu.Game/Screens/Edit/Setup/ResourcesSection.cs +++ b/osu.Game/Screens/Edit/Setup/ResourcesSection.cs @@ -49,16 +49,16 @@ namespace osu.Game.Screens.Edit.Setup Height = 110, }; - bool multipleDifficulties = working.Value.BeatmapSetInfo.Beatmaps.Count > 1; + bool beatmapHasMultipleDifficulties = working.Value.BeatmapSetInfo.Beatmaps.Count > 1; Children = new Drawable[] { - backgroundChooser = new FormBeatmapFileSelector(multipleDifficulties, ".jpg", ".jpeg", ".png") + backgroundChooser = new FormBeatmapFileSelector(beatmapHasMultipleDifficulties, ".jpg", ".jpeg", ".png") { Caption = GameplaySettingsStrings.BackgroundHeader, PlaceholderText = EditorSetupStrings.ClickToSelectBackground, }, - audioTrackChooser = new FormBeatmapFileSelector(multipleDifficulties, ".mp3", ".ogg") + audioTrackChooser = new FormBeatmapFileSelector(beatmapHasMultipleDifficulties, ".mp3", ".ogg") { Caption = EditorSetupStrings.AudioTrack, PlaceholderText = EditorSetupStrings.ClickToSelectTrack,