public void TestColumnHidingOnRulesetChange() { createScreen(); changeRuleset(0); AddAssert("5 columns visible", () => this.ChildrenOfType <ModColumn>().Count(col => col.IsPresent) == 5); AddStep("change to ruleset without all mod types", () => Ruleset.Value = TestCustomisableModRuleset.CreateTestRulesetInfo()); AddUntilStep("1 column visible", () => this.ChildrenOfType <ModColumn>().Count(col => col.IsPresent) == 1); changeRuleset(0); AddAssert("5 columns visible", () => this.ChildrenOfType <ModColumn>().Count(col => col.IsPresent) == 5); }
public void SetUpSteps() { AddStep("Reset recorder state", cleanUpState); AddStep("Setup containers", () => { replay = new Replay(); Add(new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { recordingManager = new TestRulesetInputManager(TestCustomisableModRuleset.CreateTestRulesetInfo(), 0, SimultaneousBindingMode.Unique) { Recorder = recorder = new TestReplayRecorder(new Score { Replay = replay, ScoreInfo = { BeatmapInfo = gameplayState.Beatmap.BeatmapInfo, Ruleset = new OsuRuleset().RulesetInfo, } }) { ScreenSpaceToGamefield = pos => recordingManager.ToLocalSpace(pos), }, Child = new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Colour = Color4.Brown, RelativeSizeAxes = Axes.Both, }, new OsuSpriteText { Text = "Recording", Scale = new Vector2(3), Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new TestInputConsumer() } }, } }, new Drawable[] { playbackManager = new TestRulesetInputManager(TestCustomisableModRuleset.CreateTestRulesetInfo(), 0, SimultaneousBindingMode.Unique) { ReplayInputHandler = new TestFramedReplayInputHandler(replay) { GamefieldToScreenSpace = pos => playbackManager.ToScreenSpace(pos), }, Child = new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { new Box { Colour = Color4.DarkBlue, RelativeSizeAxes = Axes.Both, }, new OsuSpriteText { Text = "Playback", Scale = new Vector2(3), Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new TestInputConsumer() } }, } } } }); }); }