mirror of https://github.com/ppy/osu
Actually load a beatmap for TestCaseEditorTimingTimeline
This commit is contained in:
parent
01c3818ea0
commit
252121968d
|
@ -34,6 +34,21 @@ public TestCaseEditorTimingTimeline()
|
|||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase osuGame, BeatmapManager beatmaps)
|
||||
{
|
||||
BeatmapSetInfo setInfo = null;
|
||||
|
||||
var sets = beatmaps.GetAllUsableBeatmapSets(false);
|
||||
if (sets.Count > 0)
|
||||
setInfo = beatmaps.QueryBeatmapSet(s => s.ID == sets[RNG.Next(0, sets.Count - 1)].ID);
|
||||
|
||||
if (setInfo == null)
|
||||
return;
|
||||
|
||||
osuGame.Beatmap.Value = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
|
||||
}
|
||||
|
||||
private class TimingTimeline : CompositeDrawable
|
||||
{
|
||||
private const float corner_radius = 5;
|
||||
|
|
Loading…
Reference in New Issue