Revert beatmap option button state changes

This commit is contained in:
Salman Ahmed
2022-11-17 03:54:35 +03:00
parent 5d8d8ffce5
commit 0e46614c57
5 changed files with 4 additions and 69 deletions

View File

@ -116,10 +116,6 @@ namespace osu.Game.Screens.Select
private double audioFeedbackLastPlaybackTime;
protected BeatmapOptionsButton DeleteOptionButton;
protected BeatmapOptionsButton ClearOptionButton;
[CanBeNull]
private IDisposable modSelectOverlayRegistration;
@ -290,8 +286,8 @@ namespace osu.Game.Screens.Select
BeatmapOptions.AddButton(@"Manage", @"collections", FontAwesome.Solid.Book, colours.Green, () => manageCollectionsDialog?.Show());
BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.Regular.TimesCircle, colours.Purple, null);
DeleteOptionButton = BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo));
ClearOptionButton = BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, colours.Purple, () => clearScores(Beatmap.Value.BeatmapInfo));
BeatmapOptions.AddButton(@"Delete", @"all difficulties", FontAwesome.Solid.Trash, colours.Pink, () => delete(Beatmap.Value.BeatmapSetInfo));
BeatmapOptions.AddButton(@"Clear", @"local scores", FontAwesome.Solid.Eraser, colours.Purple, () => clearScores(Beatmap.Value.BeatmapInfo));
}
sampleChangeDifficulty = audio.Samples.Get(@"SongSelect/select-difficulty");
@ -417,14 +413,6 @@ namespace osu.Game.Screens.Select
{
var beatmap = e?.NewValue ?? Beatmap.Value;
if (beatmap is DummyWorkingBeatmap || !this.IsCurrentScreen())
{
OnBeatmapOptionsButtonDisabledChanged(true);
return;
}
OnBeatmapOptionsButtonDisabledChanged(false);
Logger.Log($"Song select working beatmap updated to {beatmap}");
if (!Carousel.SelectBeatmap(beatmap.BeatmapInfo, false))
@ -658,12 +646,6 @@ namespace osu.Game.Screens.Select
return false;
}
protected virtual void OnBeatmapOptionsButtonDisabledChanged(bool disabled)
{
DeleteOptionButton.Disabled = disabled;
ClearOptionButton.Disabled = disabled;
}
private void playExitingTransition()
{
ModSelect.Hide();