Rename all remaining cases

This commit is contained in:
Dean Herbert
2021-10-03 00:55:29 +09:00
parent 973c31132b
commit ec61c3c5ee
58 changed files with 342 additions and 341 deletions

View File

@ -345,22 +345,22 @@ namespace osu.Game.Screens.Select
/// </summary>
protected abstract BeatmapDetailArea CreateBeatmapDetailArea();
public void Edit(BeatmapInfo beatmap = null)
public void Edit(BeatmapInfo beatmapInfo = null)
{
if (!AllowEditing)
throw new InvalidOperationException($"Attempted to edit when {nameof(AllowEditing)} is disabled");
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmapInfo ?? beatmapInfoNoDebounce);
this.Push(new EditorLoader());
}
/// <summary>
/// Call to make a selection and perform the default action for this SongSelect.
/// </summary>
/// <param name="beatmap">An optional beatmap to override the current carousel selection.</param>
/// <param name="beatmapInfo">An optional beatmap to override the current carousel selection.</param>
/// <param name="ruleset">An optional ruleset to override the current carousel selection.</param>
/// <param name="customStartAction">An optional custom action to perform instead of <see cref="OnStart"/>.</param>
public void FinaliseSelection(BeatmapInfo beatmap = null, RulesetInfo ruleset = null, Action customStartAction = null)
public void FinaliseSelection(BeatmapInfo beatmapInfo = null, RulesetInfo ruleset = null, Action customStartAction = null)
{
// This is very important as we have not yet bound to screen-level bindables before the carousel load is completed.
if (!Carousel.BeatmapSetsLoaded)
@ -379,8 +379,8 @@ namespace osu.Game.Screens.Select
// this could happen via a user interaction while the carousel is still in a loading state.
if (Carousel.SelectedBeatmapInfo == null) return;
if (beatmap != null)
Carousel.SelectBeatmap(beatmap);
if (beatmapInfo != null)
Carousel.SelectBeatmap(beatmapInfo);
if (selectionChangedDebounce?.Completed == false)
{
@ -435,18 +435,18 @@ namespace osu.Game.Screens.Select
}
// We need to keep track of the last selected beatmap ignoring debounce to play the correct selection sounds.
private BeatmapInfo beatmapNoDebounce;
private BeatmapInfo beatmapInfoNoDebounce;
private RulesetInfo rulesetNoDebounce;
private void updateSelectedBeatmap(BeatmapInfo beatmap)
private void updateSelectedBeatmap(BeatmapInfo beatmapInfo)
{
if (beatmap == null && beatmapNoDebounce == null)
if (beatmapInfo == null && beatmapInfoNoDebounce == null)
return;
if (beatmap?.Equals(beatmapNoDebounce) == true)
if (beatmapInfo?.Equals(beatmapInfoNoDebounce) == true)
return;
beatmapNoDebounce = beatmap;
beatmapInfoNoDebounce = beatmapInfo;
performUpdateSelected();
}
@ -467,12 +467,12 @@ namespace osu.Game.Screens.Select
/// </summary>
private void performUpdateSelected()
{
var beatmap = beatmapNoDebounce;
var beatmap = beatmapInfoNoDebounce;
var ruleset = rulesetNoDebounce;
selectionChangedDebounce?.Cancel();
if (beatmapNoDebounce == null)
if (beatmapInfoNoDebounce == null)
run();
else
selectionChangedDebounce = Scheduler.AddDelayed(run, 200);
@ -803,11 +803,11 @@ namespace osu.Game.Screens.Select
dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap));
}
private void clearScores(BeatmapInfo beatmap)
private void clearScores(BeatmapInfo beatmapInfo)
{
if (beatmap == null || beatmap.ID <= 0) return;
if (beatmapInfo == null || beatmapInfo.ID <= 0) return;
dialogOverlay?.Push(new BeatmapClearScoresDialog(beatmap, () =>
dialogOverlay?.Push(new BeatmapClearScoresDialog(beatmapInfo, () =>
// schedule done here rather than inside the dialog as the dialog may fade out and never callback.
Schedule(() => BeatmapDetails.Refresh())));
}