Add interpreted difficulty info to `BeatmapVerifierContext`

Enables checks to make use of the difficulty level as shown in the settings UI.
This commit is contained in:
Naxess 2021-05-12 02:30:21 +02:00
parent c13b93e6f1
commit 64d96b06a6
2 changed files with 8 additions and 1 deletions

View File

@ -17,9 +17,15 @@ public class BeatmapVerifierContext
/// </summary>
public readonly IWorkingBeatmap WorkingBeatmap;
public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap)
/// <summary>
/// The difficulty level which the current beatmap is considered to be.
/// </summary>
public readonly Bindable<DifficultyRating> InterpretedDifficulty;
public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap, DifficultyRating difficultyRating = DifficultyRating.ExpertPlus)
{
WorkingBeatmap = workingBeatmap;
InterpretedDifficulty = new Bindable<DifficultyRating>(difficultyRating);
}
}
}

View File

@ -59,6 +59,7 @@ private void load(OverlayColourProvider colours)
InterpretedDifficulty = new Bindable<DifficultyRating>(beatmap.BeatmapInfo.DifficultyRating);
context = new BeatmapVerifierContext(workingBeatmap.Value);
context.InterpretedDifficulty.BindTo(InterpretedDifficulty);
RelativeSizeAxes = Axes.Both;