1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 23:59:16 +08:00

Rename parameter to be more clear

This commit is contained in:
Dean Herbert 2024-11-28 15:13:32 +09:00
parent 238a1ce284
commit 4d9d5adbf4
No known key found for this signature in database
2 changed files with 11 additions and 11 deletions

View File

@ -27,19 +27,19 @@ namespace osu.Game.Screens.Edit.Setup
/// </remarks> /// </remarks>
public partial class FormBeatmapFileSelector : FormFileSelector public partial class FormBeatmapFileSelector : FormFileSelector
{ {
private readonly bool multipleDifficulties; private readonly bool beatmapHasMultipleDifficulties;
public readonly Bindable<bool> ApplyToAllDifficulties = new Bindable<bool>(true); public readonly Bindable<bool> ApplyToAllDifficulties = new Bindable<bool>(true);
public FormBeatmapFileSelector(bool multipleDifficulties, params string[] handledExtensions) public FormBeatmapFileSelector(bool beatmapHasMultipleDifficulties, params string[] handledExtensions)
: base(handledExtensions) : base(handledExtensions)
{ {
this.multipleDifficulties = multipleDifficulties; this.beatmapHasMultipleDifficulties = beatmapHasMultipleDifficulties;
} }
protected override FileChooserPopover CreatePopover(string[] handledExtensions, Bindable<FileInfo?> current, string? chooserPath) protected override FileChooserPopover CreatePopover(string[] handledExtensions, Bindable<FileInfo?> current, string? chooserPath)
{ {
var popover = new BeatmapFileChooserPopover(handledExtensions, current, chooserPath, multipleDifficulties); var popover = new BeatmapFileChooserPopover(handledExtensions, current, chooserPath, beatmapHasMultipleDifficulties);
popover.ApplyToAllDifficulties.ValueChanged += v => popover.ApplyToAllDifficulties.ValueChanged += v =>
{ {
@ -52,16 +52,16 @@ namespace osu.Game.Screens.Edit.Setup
private partial class BeatmapFileChooserPopover : FileChooserPopover private partial class BeatmapFileChooserPopover : FileChooserPopover
{ {
private readonly bool multipleDifficulties; private readonly bool beatmapHasMultipleDifficulties;
public readonly Bindable<bool?> ApplyToAllDifficulties = new Bindable<bool?>(); public readonly Bindable<bool?> ApplyToAllDifficulties = new Bindable<bool?>();
private Container changeScopeContainer = null!; private Container changeScopeContainer = null!;
public BeatmapFileChooserPopover(string[] handledExtensions, Bindable<FileInfo?> current, string? chooserPath, bool multipleDifficulties) public BeatmapFileChooserPopover(string[] handledExtensions, Bindable<FileInfo?> current, string? chooserPath, bool beatmapHasMultipleDifficulties)
: base(handledExtensions, current, chooserPath) : base(handledExtensions, current, chooserPath)
{ {
this.multipleDifficulties = multipleDifficulties; this.beatmapHasMultipleDifficulties = beatmapHasMultipleDifficulties;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -142,7 +142,7 @@ namespace osu.Game.Screens.Edit.Setup
protected override void OnFileSelected(FileInfo file) protected override void OnFileSelected(FileInfo file)
{ {
if (multipleDifficulties) if (beatmapHasMultipleDifficulties)
changeScopeContainer.FadeIn(200, Easing.InQuint); changeScopeContainer.FadeIn(200, Easing.InQuint);
else else
base.OnFileSelected(file); base.OnFileSelected(file);

View File

@ -49,16 +49,16 @@ namespace osu.Game.Screens.Edit.Setup
Height = 110, Height = 110,
}; };
bool multipleDifficulties = working.Value.BeatmapSetInfo.Beatmaps.Count > 1; bool beatmapHasMultipleDifficulties = working.Value.BeatmapSetInfo.Beatmaps.Count > 1;
Children = new Drawable[] Children = new Drawable[]
{ {
backgroundChooser = new FormBeatmapFileSelector(multipleDifficulties, ".jpg", ".jpeg", ".png") backgroundChooser = new FormBeatmapFileSelector(beatmapHasMultipleDifficulties, ".jpg", ".jpeg", ".png")
{ {
Caption = GameplaySettingsStrings.BackgroundHeader, Caption = GameplaySettingsStrings.BackgroundHeader,
PlaceholderText = EditorSetupStrings.ClickToSelectBackground, PlaceholderText = EditorSetupStrings.ClickToSelectBackground,
}, },
audioTrackChooser = new FormBeatmapFileSelector(multipleDifficulties, ".mp3", ".ogg") audioTrackChooser = new FormBeatmapFileSelector(beatmapHasMultipleDifficulties, ".mp3", ".ogg")
{ {
Caption = EditorSetupStrings.AudioTrack, Caption = EditorSetupStrings.AudioTrack,
PlaceholderText = EditorSetupStrings.ClickToSelectTrack, PlaceholderText = EditorSetupStrings.ClickToSelectTrack,