Exemplo n.º 1
0
        public SummaryTimeline()
        {
            TimelinePart markerPart, controlPointPart, bookmarkPart, breakPart;

            Children = new[]
            {
                markerPart = new MarkerPart {
                    RelativeSizeAxes = Axes.Both
                },
                controlPointPart = new ControlPointPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.BottomCentre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.35f
                },
                bookmarkPart = new BookmarkPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.TopCentre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.35f
                },
                timelineBar = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new Circle
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreRight,
                            Size   = new Vector2(5)
                        },
                        new Box
                        {
                            Anchor           = Anchor.CentreLeft,
                            Origin           = Anchor.CentreLeft,
                            RelativeSizeAxes = Axes.X,
                            Height           = 1,
                            EdgeSmoothness   = new Vector2(0, 1),
                        },
                        new Circle
                        {
                            Anchor = Anchor.CentreRight,
                            Origin = Anchor.CentreLeft,
                            Size   = new Vector2(5)
                        },
                    }
                },
                breakPart = new BreakPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.25f
                }
            };

            markerPart.Beatmap.BindTo(Beatmap);
            controlPointPart.Beatmap.BindTo(Beatmap);
            bookmarkPart.Beatmap.BindTo(Beatmap);
            breakPart.Beatmap.BindTo(Beatmap);
        }
Exemplo n.º 2
0
        private void load(OsuColour colours, IAdjustableClock adjustableClock)
        {
            TimelinePart markerPart, controlPointPart, bookmarkPart, breakPart;

            Children = new Drawable[]
            {
                markerPart = new MarkerPart(adjustableClock)
                {
                    RelativeSizeAxes = Axes.Both
                },
                controlPointPart = new ControlPointPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.BottomCentre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.35f
                },
                bookmarkPart = new BookmarkPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.TopCentre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.35f
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = colours.Gray5,
                    Children         = new Drawable[]
                    {
                        new Circle
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreRight,
                            Size   = new Vector2(5)
                        },
                        new Box
                        {
                            Anchor           = Anchor.CentreLeft,
                            Origin           = Anchor.CentreLeft,
                            RelativeSizeAxes = Axes.X,
                            Height           = 1,
                            EdgeSmoothness   = new Vector2(0, 1),
                        },
                        new Circle
                        {
                            Anchor = Anchor.CentreRight,
                            Origin = Anchor.CentreLeft,
                            Size   = new Vector2(5)
                        },
                    }
                },
                breakPart = new BreakPart
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.25f
                }
            };

            markerPart.Beatmap.BindTo(Beatmap);
            controlPointPart.Beatmap.BindTo(Beatmap);
            bookmarkPart.Beatmap.BindTo(Beatmap);
            breakPart.Beatmap.BindTo(Beatmap);
        }
Exemplo n.º 3
0
        public SummaryTimeline()
        {
            Masking      = true;
            CornerRadius = corner_radius;

            TimelinePart markerPart, controlPointPart, bookmarkPart, breakPart;

            InternalChildren = new[]
            {
                background = new Box {
                    RelativeSizeAxes = Axes.Both
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding {
                        Left = contents_padding, Right = contents_padding
                    },
                    Children = new[]
                    {
                        markerPart = new MarkerPart {
                            RelativeSizeAxes = Axes.Both
                        },
                        controlPointPart = new ControlPointPart
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.BottomCentre,
                            RelativeSizeAxes = Axes.Both,
                            Height           = 0.35f
                        },
                        bookmarkPart = new BookmarkPart
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.TopCentre,
                            RelativeSizeAxes = Axes.Both,
                            Height           = 0.35f
                        },
                        timelineBar = new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                            Children         = new Drawable[]
                            {
                                new Circle
                                {
                                    Anchor = Anchor.CentreLeft,
                                    Origin = Anchor.CentreRight,
                                    Size   = new Vector2(5)
                                },
                                new Box
                                {
                                    Anchor           = Anchor.CentreLeft,
                                    Origin           = Anchor.CentreLeft,
                                    RelativeSizeAxes = Axes.X,
                                    Height           = 1,
                                    EdgeSmoothness   = new Vector2(0, 1),
                                },
                                new Circle
                                {
                                    Anchor = Anchor.CentreRight,
                                    Origin = Anchor.CentreLeft,
                                    Size   = new Vector2(5)
                                },
                            }
                        },
                        breakPart = new BreakPart
                        {
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            RelativeSizeAxes = Axes.Both,
                            Height           = 0.25f
                        }
                    }
                }
            };

            markerPart.Beatmap.BindTo(Beatmap);
            controlPointPart.Beatmap.BindTo(Beatmap);
            bookmarkPart.Beatmap.BindTo(Beatmap);
            breakPart.Beatmap.BindTo(Beatmap);
        }