Example #1
0
            private void load(OverlayColourProvider colours)
            {
                RelativeSizeAxes = Axes.Both;

                const float margins = 10;

                InternalChildren = new Drawable[]
                {
                    new Box
                    {
                        Colour           = colours.Background3,
                        RelativeSizeAxes = Axes.Both,
                    },
                    new Box
                    {
                        Colour           = colours.Background2,
                        RelativeSizeAxes = Axes.Y,
                        Width            = ControlPointTable.TIMING_COLUMN_WIDTH + margins,
                    },
                    new OsuScrollContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Child            = table = new ControlPointTable(),
                    },
                    new FillFlowContainer
                    {
                        AutoSizeAxes = Axes.Both,
                        Anchor       = Anchor.BottomRight,
                        Origin       = Anchor.BottomRight,
                        Direction    = FillDirection.Horizontal,
                        Margin       = new MarginPadding(margins),
                        Spacing      = new Vector2(5),
                        Children     = new Drawable[]
                        {
                            deleteButton = new OsuButton
                            {
                                Text   = "-",
                                Size   = new Vector2(30, 30),
                                Action = delete,
                                Anchor = Anchor.BottomRight,
                                Origin = Anchor.BottomRight,
                            },
                            new OsuButton
                            {
                                Text   = "+ Add at current time",
                                Action = addNew,
                                Size   = new Vector2(160, 30),
                                Anchor = Anchor.BottomRight,
                                Origin = Anchor.BottomRight,
                            },
                        }
                    },
                };
            }
            private void load(OsuColour colours)
            {
                RelativeSizeAxes = Axes.Both;

                InternalChildren = new Drawable[]
                {
                    new Box
                    {
                        Colour           = colours.Gray0,
                        RelativeSizeAxes = Axes.Both,
                    },
                    new OsuScrollContainer
                    {
                        RelativeSizeAxes = Axes.Both,
                        Child            = table = new ControlPointTable(),
                    },
                    new FillFlowContainer
                    {
                        AutoSizeAxes = Axes.Both,
                        Anchor       = Anchor.BottomRight,
                        Origin       = Anchor.BottomRight,
                        Direction    = FillDirection.Horizontal,
                        Margin       = new MarginPadding(10),
                        Spacing      = new Vector2(5),
                        Children     = new Drawable[]
                        {
                            deleteButton = new OsuButton
                            {
                                Text   = "-",
                                Size   = new Vector2(30, 30),
                                Action = delete,
                                Anchor = Anchor.BottomRight,
                                Origin = Anchor.BottomRight,
                            },
                            new OsuButton
                            {
                                Text   = "+",
                                Action = addNew,
                                Size   = new Vector2(30, 30),
                                Anchor = Anchor.BottomRight,
                                Origin = Anchor.BottomRight,
                            },
                        }
                    },
                };
            }