mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 20:33:21 +08:00
Rename parameter to be more clear
This commit is contained in:
parent
238a1ce284
commit
4d9d5adbf4
@ -27,19 +27,19 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
/// </remarks>
|
||||
public partial class FormBeatmapFileSelector : FormFileSelector
|
||||
{
|
||||
private readonly bool multipleDifficulties;
|
||||
private readonly bool beatmapHasMultipleDifficulties;
|
||||
|
||||
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)
|
||||
{
|
||||
this.multipleDifficulties = multipleDifficulties;
|
||||
this.beatmapHasMultipleDifficulties = beatmapHasMultipleDifficulties;
|
||||
}
|
||||
|
||||
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 =>
|
||||
{
|
||||
@ -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<bool?> ApplyToAllDifficulties = new Bindable<bool?>();
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user