private void loadTest(int testType)
        {
            testContainer.Clear();

            Triangle triangle;

            switch (testType)
            {
            case 0:
                Container box;

                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box);

                box.Add(new[]
                {
                    new DraggableTriangle
                    {
                        //chameleon = true,
                        Position = new Vector2(0, 0),
                        Size     = new Vector2(25, 25),
                        Origin   = Anchor.Centre,
                        Anchor   = Anchor.Centre,
                        Colour   = Color4.Blue,
                    },
                    triangle = new DraggableTriangle
                    {
                        Size   = new Vector2(250, 250),
                        Alpha  = 0.5f,
                        Origin = Anchor.Centre,
                        Anchor = Anchor.Centre,
                        Colour = Color4.DarkSeaGreen,
                    }
                });

                triangle.OnUpdate += delegate { triangle.Rotation += 0.05f; };
                break;
            }

#if DEBUG
            //if (toggleDebugAutosize.State)
            //    testContainer.Children.FindAll(c => c.HasAutosizeChildren).ForEach(c => c.AutoSizeDebug = true);
#endif
        }
示例#2
0
        private void loadTest(int testType)
        {
            testContainer.Clear();

            Container box;

            switch (testType)
            {
            case 0:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box);

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Position = new Vector2(0, 0),
                    Size     = new Vector2(25, 25),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre,
                    Colour   = Color4.Blue,
                });

                box.Add(box = new InfofulBox
                {
                    Size   = new Vector2(250, 250),
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre,
                    Colour = Color4.DarkSeaGreen,
                });

                box.OnUpdate += delegate { box.Rotation += 0.05f; };
                break;

            case 1:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 5);


                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour = Color4.DarkSeaGreen,
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                Drawable localBox = box;
                box.OnUpdate += delegate { localBox.Rotation += 0.05f; };

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Size     = new Vector2(100, 100),
                    Position = new Vector2(50, 50),
                    Alpha    = 0.5f,
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre,
                    Colour   = Color4.Blue,
                });
                break;

            case 2:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 10, Color4.YellowGreen);

                for (int i = 0; i < 50; i++)
                {
                    box.Add(box = new InfofulBoxAutoSize
                    {
                        Colour   = new Color4(253, 253, 253, 255),
                        Position = new Vector2(-3, -3),
                        Origin   = Anchor.BottomRight,
                        Anchor   = Anchor.BottomRight,
                    });
                }

                addCornerMarkers(box, 2);

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Size   = new Vector2(50, 50),
                    Origin = Anchor.BottomRight,
                    Anchor = Anchor.BottomRight,
                    Colour = Color4.SeaGreen,
                });
                break;

            case 3:
                testContainer.Add(box = new InfofulBox
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Size   = new Vector2(250, 250)
                });

                addCornerMarkers(box, 10, Color4.YellowGreen);

                for (int i = 0; i < 100; i++)
                {
                    box.Add(box = new InfofulBox
                    {
                        RelativeSizeAxes = Axes.Both,
                        Colour           = new Color4(253, 253, 253, 255),
                        Origin           = Anchor.BottomRight,
                        Anchor           = Anchor.BottomRight,
                        Size             = new Vector2(0.99f, 0.99f)
                    });
                }

                addCornerMarkers(box, 2);

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Size   = new Vector2(50, 50),
                    Origin = Anchor.BottomRight,
                    Anchor = Anchor.BottomRight,
                    Colour = Color4.SeaGreen,
                });
                break;

            case 4:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "Test CentreLeft line 1",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "Test CentreLeft line 2",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 5:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "123,456,789=",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft,
                    Scale    = new Vector2(2f)
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "123,456,789ms",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 6:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour   = Color4.OrangeRed,
                    Position = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(100, 100),
                    Size     = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });
                break;

            case 7:
                Container            shrinkContainer;
                Container <Drawable> boxes;

                testContainer.Add(shrinkContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(0.5f, 1),
                    Anchor           = Anchor.TopCentre,
                    Origin           = Anchor.TopCentre,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = Color4.AliceBlue,
                            Alpha            = 0.2f
                        },
                        boxes = new FillFlowContainer
                        {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Direction        = FillDirection.Vertical,
                            Spacing          = new Vector2(0, 10),
                        }
                    }
                });

                for (int i = 0; i < 10; i++)
                {
                    boxes.Add(new Box
                    {
                        RelativeSizeAxes = Axes.X,
                        Anchor           = Anchor.TopCentre,
                        Origin           = Anchor.TopCentre,
                        Size             = new Vector2(0.9f, 40),
                        Colour           = Color4.AliceBlue,
                        Alpha            = 0.2f
                    });
                }

                shrinkContainer.ScaleTo(new Vector2(1.5f, 1), 1000);
                using (shrinkContainer.BeginDelayedSequence(1000))
                {
                    shrinkContainer.ScaleTo(new Vector2(1f, 1), 1000);
                    using (shrinkContainer.BeginDelayedSequence(1000))
                    {
                        shrinkContainer.Loop();
                    }
                }
                break;

            case 8:
            {
                Container box1;
                Container box2;
                Container box3;

                testContainer.Add(new FillFlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box1 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box2 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box3 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Container b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    using (b.BeginDelayedSequence(1000))
                    {
                        b.ScaleTo(new Vector2(1, 1), 1000);
                        using (b.BeginDelayedSequence(1000))
                        {
                            b.Loop();
                        }
                    }
                }

                break;
            }

            case 9:
            {
                Container box1;
                Container box2;
                Container box3;

                testContainer.Add(new FillFlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box1 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box2 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box3 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Container b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    using (b.BeginDelayedSequence(1000))
                    {
                        b.ScaleTo(new Vector2(1, 1), 1000);
                        using (b.BeginDelayedSequence(1000))
                        {
                            b.Loop();
                        }
                    }
                }

                break;
            }

            case 10:
            {
                Container box1;
                Container box2;
                Container box3;

                testContainer.Add(new FillFlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new Drawable[]
                                                {
                                                    box1 = new InfofulBox
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new Drawable[]
                                                {
                                                    box2 = new InfofulBox
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new Drawable[]
                                                {
                                                    box3 = new InfofulBox
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Container b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    using (b.BeginDelayedSequence(1000))
                    {
                        b.ScaleTo(new Vector2(1, 1), 1000);
                        using (b.BeginDelayedSequence(1000))
                        {
                            b.Loop();
                        }
                    }
                }

                break;
            }

            case 11:
            {
                Drawable box1;
                Drawable box2;
                Drawable box3;

                testContainer.Add(new FillFlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new[]
                                                {
                                                    box1 = new Box
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new[]
                                                {
                                                    box2 = new Box
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = -1,
                                                Children     = new[]
                                                {
                                                    box3 = new Box
                                                    {
                                                        Margin = new MarginPadding(50),
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Drawable b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    using (b.BeginDelayedSequence(1000))
                    {
                        b.ScaleTo(new Vector2(1, 1), 1000);
                        using (b.BeginDelayedSequence(1000))
                            b.Loop();
                    }
                }

                break;
            }

            case 12:
            {
                // demonstrates how relativeaxes drawables act inside an autosize parent
                Drawable sizedBox;

                testContainer.Add(new FillFlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            new Container
                            {
                                Size     = new Vector2(300),
                                Anchor   = Anchor.Centre,
                                Origin   = Anchor.Centre,
                                Children = new Drawable[]
                                {
                                    new Box {
                                        Colour = Color4.Gray, RelativeSizeAxes = Axes.Both
                                    },
                                    new Container
                                    {
                                        AutoSizeAxes = Axes.Both,
                                        Anchor       = Anchor.Centre,
                                        Origin       = Anchor.Centre,
                                        Children     = new[]
                                        {
                                            // defines the size of autosize
                                            sizedBox = new Box
                                            {
                                                Colour = Color4.Red,
                                                Anchor = Anchor.Centre,
                                                Origin = Anchor.Centre,
                                                Size   = new Vector2(100f)
                                            },
                                            // gets relative size based on autosize
                                            new Box
                                            {
                                                Colour           = Color4.Black,
                                                RelativeSizeAxes = Axes.Both,
                                                Size             = new Vector2(0.5f)
                                            },
                                        }
                                    }
                                }
                            }
                        }
                    });

                sizedBox.ScaleTo(new Vector2(2, 2), 1000, EasingTypes.Out);
                using (sizedBox.BeginDelayedSequence(1000))
                {
                    sizedBox.ScaleTo(new Vector2(1, 1), 1000, EasingTypes.In);
                    using (sizedBox.BeginDelayedSequence(1000))
                        sizedBox.Loop();
                }

                break;
            }
            }

#if DEBUG
            //if (toggleDebugAutosize.State)
            //    testContainer.Children.FindAll(c => c.HasAutosizeChildren).ForEach(c => c.AutoSizeDebug = true);
#endif
        }
示例#3
0
        private void loadTest(int testType)
        {
            currentTest = testType;

            testContainer.Clear();

            Container box = null;

            switch (currentTest)
            {
            case 1:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box);

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.Blue)
                {
                    //chameleon = true,
                    Position = new Vector2(0, 0),
                    Size     = new Vector2(25, 25),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre
                });

                box.Add(box = new InfofulBox(RectangleF.Empty, 0, Color4.DarkSeaGreen)
                {
                    Size   = new Vector2(250, 250),
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                box.OnUpdate += delegate
                {
                    box.Rotation += 0.05f;
                };
                break;

            case 2:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 5);


                box.Add(box = new InfofulBoxAutoSize()
                {
                    Colour = Color4.DarkSeaGreen,
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                Drawable localBox = box;
                box.OnUpdate += delegate
                {
                    localBox.Rotation += 0.05f;
                };

                box.Add(box = new InfofulBox(RectangleF.Empty, 0, Color4.Blue)
                {
                    //chameleon = true,
                    Size     = new Vector2(100, 100),
                    Position = new Vector2(50, 50),
                    Alpha    = 0.5f,
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre
                });
                break;

            case 3:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 10, Color4.YellowGreen);

                for (int i = 0; i < 100; i++)
                {
                    box.Add(box = new InfofulBoxAutoSize()
                    {
                        Colour   = new Color4(253, 253, 253, 255),
                        Position = new Vector2(3, 3),
                        Origin   = Anchor.BottomRight,
                        Anchor   = Anchor.BottomRight
                    });
                }

                addCornerMarkers(box, 2);

                box.Add(new InfofulBox(RectangleF.Empty, 1, Color4.SeaGreen)
                {
                    //chameleon = true,
                    Size   = new Vector2(50, 50),
                    Origin = Anchor.TopLeft,
                    Anchor = Anchor.TopLeft
                });
                break;

            case 4:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new SpriteText()
                {
                    Position = new Vector2(5, -20),
                    Text     = "Test CentreLeft line 1",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });

                box.Add(new SpriteText()
                {
                    Position = new Vector2(5, 20),
                    Text     = "Test CentreLeft line 2",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 5:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new SpriteText()
                {
                    Position = new Vector2(5, -20),
                    Text     = "123,456,789=",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft,
                    Scale    = new Vector2(2f)
                });

                box.Add(new SpriteText()
                {
                    Position = new Vector2(5, 20),
                    Text     = "123,456,789ms",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 6:
                testContainer.Add(box = new InfofulBoxAutoSize()
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                box.Add(box = new InfofulBoxAutoSize()
                {
                    Colour   = Color4.OrangeRed,
                    Position = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(box = new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(100, 100),
                    Size     = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });
                break;
            }

#if DEBUG
            //if (toggleDebugAutosize.State)
            //    testContainer.Children.FindAll(c => c.HasAutosizeChildren).ForEach(c => c.AutoSizeDebug = true);
#endif
        }
        private void loadTest(int testType)
        {
            testContainer.Clear();

            Container box;

            switch (testType)
            {
            case 0:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box);

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Position = new Vector2(0, 0),
                    Size     = new Vector2(25, 25),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre,
                    Colour   = Color4.Blue,
                });

                box.Add(box = new InfofulBox
                {
                    Size   = new Vector2(250, 250),
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre,
                    Colour = Color4.DarkSeaGreen,
                });

                box.OnUpdate += delegate { box.Rotation += 0.05f; };
                break;

            case 1:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 5);


                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour = Color4.DarkSeaGreen,
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                Drawable localBox = box;
                box.OnUpdate += delegate { localBox.Rotation += 0.05f; };

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Size     = new Vector2(100, 100),
                    Position = new Vector2(50, 50),
                    Alpha    = 0.5f,
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre,
                    Colour   = Color4.Blue,
                });
                break;

            case 2:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 10, Color4.YellowGreen);

                for (int i = 0; i < 100; i++)
                {
                    box.Add(box = new InfofulBoxAutoSize
                    {
                        Colour   = new Color4(253, 253, 253, 255),
                        Position = new Vector2(3, 3),
                        Origin   = Anchor.BottomRight,
                        Anchor   = Anchor.BottomRight
                    });
                }

                addCornerMarkers(box, 2);

                box.Add(new InfofulBox
                {
                    //chameleon = true,
                    Size   = new Vector2(50, 50),
                    Origin = Anchor.TopLeft,
                    Anchor = Anchor.TopLeft,
                    Colour = Color4.SeaGreen,
                });
                break;

            case 3:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "Test CentreLeft line 1",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "Test CentreLeft line 2",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 4:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "123,456,789=",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft,
                    Scale    = new Vector2(2f)
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "123,456,789ms",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 5:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour   = Color4.OrangeRed,
                    Position = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new InfofulBox
                {
                    Position = new Vector2(100, 100),
                    Size     = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft,
                    Colour   = Color4.OrangeRed,
                });
                break;

            case 6:
                Container            shrinkContainer;
                Container <Drawable> boxes;

                testContainer.Add(shrinkContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(0.5f, 1),
                    Anchor           = Anchor.TopCentre,
                    Origin           = Anchor.TopCentre,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = Color4.AliceBlue,
                            Alpha            = 0.2f
                        },
                        boxes = new FlowContainer {
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Spacing          = new Vector2(0, 10),
                            Direction        = FlowDirection.VerticalOnly,
                        }
                    }
                });

                for (int i = 0; i < 10; i++)
                {
                    boxes.Add(new Box
                    {
                        RelativeSizeAxes = Axes.X,
                        Anchor           = Anchor.TopCentre,
                        Origin           = Anchor.TopCentre,
                        Size             = new Vector2(0.9f, 40),
                        Colour           = Color4.AliceBlue,
                        Alpha            = 0.2f
                    });
                }

                shrinkContainer.ScaleTo(new Vector2(1.5f, 1), 1000);
                shrinkContainer.Delay(1000);
                shrinkContainer.ScaleTo(new Vector2(1f, 1), 1000);
                shrinkContainer.Delay(1000);
                shrinkContainer.Loop();
                break;

            case 7:
            {
                Container box1;
                Container box2;
                Container box3;

                testContainer.Add(new FlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box1 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box2 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Padding      = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box3 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Container b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    b.Delay(1000);
                    b.ScaleTo(new Vector2(1, 1), 1000);
                    b.Delay(1000);
                    b.Loop();
                }

                break;
            }

            case 8:
            {
                Container box1;
                Container box2;
                Container box3;

                testContainer.Add(new FlowContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Children         = new Drawable[]
                        {
                            // This first guy is used for spacing.
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.125f, 1),
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box1 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.TopLeft,
                                                        Origin = Anchor.TopLeft,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box2 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.Centre,
                                                        Origin = Anchor.Centre,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                            new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Size             = new Vector2(0.25f, 1),
                                Children         = new[]
                                {
                                    new InfofulBoxAutoSize
                                    {
                                        Anchor   = Anchor.Centre,
                                        Origin   = Anchor.Centre,
                                        Children = new[]
                                        {
                                            new Container
                                            {
                                                AutoSizeAxes = Axes.Both,
                                                Depth        = 1,
                                                Margin       = new MarginPadding(50),
                                                Children     = new Drawable[]
                                                {
                                                    box3 = new InfofulBox
                                                    {
                                                        Anchor = Anchor.BottomRight,
                                                        Origin = Anchor.BottomRight,
                                                        Size   = new Vector2(50),
                                                        Colour = Color4.Blue,
                                                    },
                                                }
                                            }
                                        }
                                    },
                                }
                            },
                        }
                    });

                foreach (Container b in new[] { box1, box2, box3 })
                {
                    b.ScaleTo(new Vector2(2, 2), 1000);
                    b.Delay(1000);
                    b.ScaleTo(new Vector2(1, 1), 1000);
                    b.Delay(1000);
                    b.Loop();
                }

                break;
            }
            }

#if DEBUG
            //if (toggleDebugAutosize.State)
            //    testContainer.Children.FindAll(c => c.HasAutosizeChildren).ForEach(c => c.AutoSizeDebug = true);
#endif
        }
示例#5
0
        private void loadTest(int testType)
        {
            currentTest = testType;

            testContainer.Clear();

            Container box;

            switch (currentTest)
            {
            case 1:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box);

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.Blue)
                {
                    //chameleon = true,
                    Position = new Vector2(0, 0),
                    Size     = new Vector2(25, 25),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre
                });

                box.Add(box = new InfofulBox(RectangleF.Empty, 0, Color4.DarkSeaGreen)
                {
                    Size   = new Vector2(250, 250),
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                box.OnUpdate += delegate { box.Rotation += 0.05f; };
                break;

            case 2:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 5);


                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour = Color4.DarkSeaGreen,
                    Alpha  = 0.5f,
                    Origin = Anchor.Centre,
                    Anchor = Anchor.Centre
                });

                Drawable localBox = box;
                box.OnUpdate += delegate { localBox.Rotation += 0.05f; };

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.Blue)
                {
                    //chameleon = true,
                    Size     = new Vector2(100, 100),
                    Position = new Vector2(50, 50),
                    Alpha    = 0.5f,
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.Centre
                });
                break;

            case 3:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                addCornerMarkers(box, 10, Color4.YellowGreen);

                for (int i = 0; i < 100; i++)
                {
                    box.Add(box = new InfofulBoxAutoSize
                    {
                        Colour   = new Color4(253, 253, 253, 255),
                        Position = new Vector2(3, 3),
                        Origin   = Anchor.BottomRight,
                        Anchor   = Anchor.BottomRight
                    });
                }

                addCornerMarkers(box, 2);

                box.Add(new InfofulBox(RectangleF.Empty, 1, Color4.SeaGreen)
                {
                    //chameleon = true,
                    Size   = new Vector2(50, 50),
                    Origin = Anchor.TopLeft,
                    Anchor = Anchor.TopLeft
                });
                break;

            case 4:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "Test CentreLeft line 1",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "Test CentreLeft line 2",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 5:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.CentreLeft
                });

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(5, 0),
                    Size     = new Vector2(300, 80),
                    Origin   = Anchor.TopLeft,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, -20),
                    Text     = "123,456,789=",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft,
                    Scale    = new Vector2(2f)
                });

                box.Add(new SpriteText
                {
                    Position = new Vector2(5, 20),
                    Text     = "123,456,789ms",
                    Origin   = Anchor.CentreLeft,
                    Anchor   = Anchor.CentreLeft
                });
                break;

            case 6:
                testContainer.Add(box = new InfofulBoxAutoSize
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre
                });

                box.Add(box = new InfofulBoxAutoSize
                {
                    Colour   = Color4.OrangeRed,
                    Position = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });

                box.Add(new InfofulBox(RectangleF.Empty, 0, Color4.OrangeRed)
                {
                    Position = new Vector2(100, 100),
                    Size     = new Vector2(100, 100),
                    Origin   = Anchor.Centre,
                    Anchor   = Anchor.TopLeft
                });
                break;

            case 7:
                Container shrinkContainer;
                Container boxes;

                testContainer.Add(shrinkContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(0.5f, 1),
                    Anchor           = Anchor.TopCentre,
                    Origin           = Anchor.TopCentre,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = Color4.AliceBlue,
                            Alpha            = 0.2f
                        },
                        boxes = new FlowContainer {
                            RelativeSizeAxes = Axes.X,
                            Padding          = new Vector2(0, 10),
                            Direction        = FlowDirection.VerticalOnly,
                        }
                    }
                });

                for (int i = 0; i < 10; i++)
                {
                    boxes.Add(new Box
                    {
                        RelativeSizeAxes = Axes.X,
                        Anchor           = Anchor.TopCentre,
                        Origin           = Anchor.TopCentre,
                        Size             = new Vector2(0.9f, 40),
                        Colour           = Color4.AliceBlue,
                        Alpha            = 0.2f
                    });
                }

                shrinkContainer.ScaleTo(new Vector2(1.5f, 1), 1000);
                shrinkContainer.Delay(1000);
                shrinkContainer.ScaleTo(new Vector2(1f, 1), 1000);
                shrinkContainer.Delay(1000);
                shrinkContainer.Loop();
                break;
            }

#if DEBUG
            //if (toggleDebugAutosize.State)
            //    testContainer.Children.FindAll(c => c.HasAutosizeChildren).ForEach(c => c.AutoSizeDebug = true);
#endif
        }