protected override void LoadComplete() { base.LoadComplete(); Add(infoWedge = new TestBeatmapInfoWedge { Size = new Vector2(0.5f, 245), RelativeSizeAxes = Axes.X, Margin = new MarginPadding { Top = 20 } }); AddStep("show", () => { infoWedge.Show(); infoWedge.Beatmap = Beatmap.Value; }); // select part is redundant, but wait for load isn't selectBeatmap(Beatmap.Value.Beatmap); AddWaitStep("wait for select", 3); AddStep("hide", () => { infoWedge.Hide(); }); AddWaitStep("wait for hide", 3); AddStep("show", () => { infoWedge.Show(); }); foreach (var rulesetInfo in rulesets.AvailableRulesets) { var instance = rulesetInfo.CreateInstance(); var testBeatmap = createTestBeatmap(rulesetInfo); beatmaps.Add(testBeatmap); AddStep("set ruleset", () => Ruleset.Value = rulesetInfo); selectBeatmap(testBeatmap); testBeatmapLabels(instance); switch (instance) { case OsuRuleset _: testInfoLabels(5); break; case TaikoRuleset _: testInfoLabels(5); break; case CatchRuleset _: testInfoLabels(5); break; case ManiaRuleset _: testInfoLabels(4); break; default: testInfoLabels(2); break; } } }
protected override void LoadComplete() { base.LoadComplete(); Add(infoWedge = new TestBeatmapInfoWedge { Size = new Vector2(0.5f, 245), RelativeSizeAxes = Axes.X, Margin = new MarginPadding { Top = 20 } }); AddStep("show", () => { infoWedge.Show(); infoWedge.Beatmap = Beatmap.Value; }); // select part is redundant, but wait for load isn't selectBeatmap(Beatmap.Value.Beatmap); AddWaitStep("wait for select", 3); AddStep("hide", () => { infoWedge.Hide(); }); AddWaitStep("wait for hide", 3); AddStep("show", () => { infoWedge.Show(); }); AddSliderStep("change star difficulty", 0, 11.9, 5.55, v => { foreach (var hasCurrentValue in infoWedge.Info.ChildrenOfType <IHasCurrentValue <StarDifficulty> >()) { hasCurrentValue.Current.Value = new StarDifficulty(v, 0); } }); foreach (var rulesetInfo in rulesets.AvailableRulesets) { var instance = rulesetInfo.CreateInstance(); var testBeatmap = createTestBeatmap(rulesetInfo); beatmaps.Add(testBeatmap); setRuleset(rulesetInfo); selectBeatmap(testBeatmap); testBeatmapLabels(instance); switch (instance) { case OsuRuleset _: testInfoLabels(5); break; case TaikoRuleset _: testInfoLabels(5); break; case CatchRuleset _: testInfoLabels(5); break; case ManiaRuleset _: testInfoLabels(4); break; default: testInfoLabels(2); break; } } }