Ejemplo n.º 1
0
        public TestSceneCheckboxes()
        {
            BasicCheckbox swap, rotate;

            Children = new Drawable[]
            {
                new FillFlowContainer
                {
                    Anchor       = Anchor.TopLeft,
                    Origin       = Anchor.TopLeft,
                    Direction    = FillDirection.Vertical,
                    Spacing      = new Vector2(0, 10),
                    Padding      = new MarginPadding(10),
                    AutoSizeAxes = Axes.Both,
                    Children     = new Drawable[]
                    {
                        basic = new BasicCheckbox
                        {
                            LabelText = @"Basic Test"
                        },
                        new BasicCheckbox
                        {
                            LabelText    = @"FadeDuration Test",
                            FadeDuration = 300
                        },
                        swap = new BasicCheckbox
                        {
                            LabelText = @"Checkbox Position",
                        },
                        rotate = new BasicCheckbox
                        {
                            LabelText = @"Enabled/Disabled Actions Test",
                        },
                    }
                }
            };

            swap.Current.ValueChanged   += check => swap.RightHandedCheckbox = check.NewValue;
            rotate.Current.ValueChanged += e => rotate.RotateTo(e.NewValue ? 45 : 0, 100);
        }