1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 12:47:18 +08:00

Rename event to be more generic (and add comprehensive xmldoc)

This commit is contained in:
Dean Herbert 2022-09-13 14:59:30 +09:00
parent fd48249eef
commit f53507828c
2 changed files with 9 additions and 6 deletions

View File

@ -24,7 +24,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
base.LoadComplete();
editorBeatmap.SelectionBlueprintsShouldBeSorted += SortInternal;
editorBeatmap.BeatmapReprocessed += SortInternal;
}
public override void Add(SelectionBlueprint<HitObject> drawable)
@ -70,7 +70,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
base.Dispose(isDisposing);
if (editorBeatmap != null)
editorBeatmap.SelectionBlueprintsShouldBeSorted -= SortInternal;
editorBeatmap.BeatmapReprocessed -= SortInternal;
}
}
}

View File

@ -49,9 +49,13 @@ namespace osu.Game.Screens.Edit
public event Action<HitObject> HitObjectUpdated;
/// <summary>
/// Invoked after <see cref="HitObjects"/> is updated during <see cref="UpdateState"/> and blueprints need to be sorted immediately to prevent a crash.
/// Invoked after any state changes occurred which triggered a beatmap reprocess via an <see cref="IBeatmapProcessor"/>.
/// </summary>
public event Action SelectionBlueprintsShouldBeSorted;
/// <remarks>
/// Beatmap processing may change the order of hitobjects. This event gives external components a chance to handle any changes
/// not covered by the <see cref="HitObjectAdded"/> / <see cref="HitObjectUpdated"/> / <see cref="HitObjectRemoved"/> events.
/// </remarks>
public event Action BeatmapReprocessed;
/// <summary>
/// All currently selected <see cref="HitObject"/>s.
@ -336,8 +340,7 @@ namespace osu.Game.Screens.Edit
beatmapProcessor?.PostProcess();
// Signal selection blueprint sorting because it is possible that the beatmap processor changed the order of the selection blueprints
SelectionBlueprintsShouldBeSorted?.Invoke();
BeatmapReprocessed?.Invoke();
// callbacks may modify the lists so let's be safe about it
var deletes = batchPendingDeletes.ToArray();