public TestCaseZoomableScrollContainer() { Children = new Drawable[] { new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, Height = 250, Width = 0.75f, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(30) }, scrollContainer = new ZoomableScrollContainer { RelativeSizeAxes = Axes.Both } } }, new MenuCursor() }; scrollContainer.Add(innerBox = new Box { RelativeSizeAxes = Axes.Both, Colour = ColourInfo.GradientHorizontal(new Color4(0.8f, 0.6f, 0.4f, 1f), new Color4(0.4f, 0.6f, 0.8f, 1f)) }); }
public void SetUpSteps() { AddStep("Add new scroll container", () => { Children = new Drawable[] { new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, Height = 250, Width = 0.75f, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(30) }, scrollContainer = new ZoomableScrollContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, } } }, new MenuCursor() }; scrollContainer.Add(innerBox = new Box { RelativeSizeAxes = Axes.Both, Colour = ColourInfo.GradientHorizontal(new Color4(0.8f, 0.6f, 0.4f, 1f), new Color4(0.4f, 0.6f, 0.8f, 1f)) }); }); AddUntilStep("Scroll container is loaded", () => scrollContainer.LoadState >= LoadState.Loaded); }