mirror of
https://github.com/ppy/osu
synced 2025-03-02 09:30:57 +00:00
Actually load a beatmap for TestCaseEditorTimingTimeline
This commit is contained in:
parent
01c3818ea0
commit
252121968d
@ -34,6 +34,21 @@ namespace osu.Game.Tests.Visual
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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 class TimingTimeline : CompositeDrawable
|
||||||
{
|
{
|
||||||
private const float corner_radius = 5;
|
private const float corner_radius = 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user