private void load(FrameworkDebugConfigManager debugConfig, TextureStore store)
        {
            var texture              = store.Get(@"sample-texture");
            var repeatedTexture      = store.Get(@"sample-texture", WrapMode.Repeat, WrapMode.Repeat);
            var edgeClampedTexture   = store.Get(@"sample-texture", WrapMode.ClampToEdge, WrapMode.ClampToEdge);
            var borderClampedTexture = store.Get(@"sample-texture", WrapMode.ClampToBorder, WrapMode.ClampToBorder);

            AddStep("add sprites", () => addMoreDrawables(texture, new RectangleF(0, 0, 1, 1)));
            AddStep("add sprites with shrink", () => addMoreDrawables(texture, new RectangleF(0.25f, 0.25f, 0.5f, 0.5f)));
            AddStep("add sprites with repeat", () => addMoreDrawables(repeatedTexture, new RectangleF(0.25f, 0.25f, 0.5f, 0.5f)));
            AddStep("add sprites with edge clamp", () => addMoreDrawables(edgeClampedTexture, new RectangleF(0.25f, 0.25f, 0.5f, 0.5f)));
            AddStep("add sprites with border clamp", () => addMoreDrawables(borderClampedTexture, new RectangleF(0.25f, 0.25f, 0.5f, 0.5f)));
            AddStep("add boxes", () => addMoreDrawables(Texture.WhitePixel, new RectangleF(0, 0, 1, 1)));
            AddToggleStep("disable front to back", val =>
            {
                debugConfig.SetValue(DebugSetting.BypassFrontToBackPass, val);
                Invalidate(Invalidation.DrawNode); // reset counts
            });

            Add(new Container
            {
                AutoSizeAxes = Axes.Both,
                Depth        = float.NegativeInfinity,
                Anchor       = Anchor.Centre,
                Origin       = Anchor.Centre,

                Children = new Drawable[]
                {
                    new Box
                    {
                        Colour           = Color4.Black,
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0.8f,
                    },
                    new FillFlowContainer
                    {
                        AutoSizeAxes = Axes.Both,
                        Padding      = new MarginPadding(10),
                        Direction    = FillDirection.Vertical,
                        Children     = new Drawable[]
                        {
                            labelDrawables = new SpriteText {
                                Font = FrameworkFont.Condensed
                            },
                            labelFrag = new SpriteText {
                                Font = FrameworkFont.Condensed
                            },
                            labelFrag2 = new SpriteText {
                                Font = FrameworkFont.Condensed
                            },
                        }
                    },
                }
            });
        }
Exemple #2
0
 private void load(FrameworkDebugConfigManager debugConfig)
 {
     AddToggleStep("disable front to back", val => debugConfig.SetValue(DebugSetting.BypassFrontToBackPass, val));
 }