Exemplo n.º 1
0
        public EditorClock(WorkingBeatmap beatmap, BindableBeatDivisor beatDivisor)
        {
            this.beatDivisor = beatDivisor;

            ControlPointInfo = beatmap.Beatmap.ControlPointInfo;
            TrackLength      = beatmap.Track.Length;
        }
Exemplo n.º 2
0
        public EditorClock(ControlPointInfo controlPointInfo, double trackLength, BindableBeatDivisor beatDivisor)
        {
            this.beatDivisor = beatDivisor;

            ControlPointInfo = controlPointInfo;
            TrackLength      = trackLength;
        }
Exemplo n.º 3
0
        public EditorClock(ControlPointInfo controlPointInfo, double trackLength, BindableBeatDivisor beatDivisor)
        {
            this.beatDivisor = beatDivisor;

            ControlPointInfo = controlPointInfo;

            underlyingClock = new DecoupleableInterpolatingFramedClock();
        }
Exemplo n.º 4
0
        public EditorClock(IBeatmap beatmap = null, BindableBeatDivisor beatDivisor = null)
        {
            Beatmap = beatmap ?? new Beatmap();

            this.beatDivisor = beatDivisor ?? new BindableBeatDivisor();

            underlyingClock = new DecoupleableInterpolatingFramedClock();
        }
Exemplo n.º 5
0
        public EditorBeatmap(IBeatmap playableBeatmap, BindableBeatDivisor beatDivisor = null)
        {
            PlayableBeatmap  = playableBeatmap;
            this.beatDivisor = beatDivisor;

            foreach (var obj in HitObjects)
            {
                trackStartTime(obj);
            }
        }
Exemplo n.º 6
0
        private void load([CanBeNull] BindableBeatDivisor beatDivisor)
        {
            if (beatDivisor != null)
            {
                this.beatDivisor.BindTo(beatDivisor);
            }

            Child = new GridContainer
            {
                RelativeSizeAxes = Axes.Both,
                RowDimensions    = new[]
                {
                    new Dimension(GridSizeMode.AutoSize),
                    new Dimension(),
                },
                Content = new[]
                {
                    new Drawable[]
                    {
                        new Container
                        {
                            Name             = "Timeline",
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = Color4.Black.Opacity(0.5f)
                                },
                                new Container
                                {
                                    Name             = "Timeline content",
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Padding          = new MarginPadding {
                                        Horizontal = horizontal_margins, Vertical = vertical_margins
                                    },
                                    Child = new GridContainer
                                    {
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Content          = new[]
                                        {
                                            new Drawable[]
                                            {
                                                timelineContainer = new Container
                                                {
                                                    RelativeSizeAxes = Axes.X,
                                                    AutoSizeAxes     = Axes.Y,
                                                    Padding          = new MarginPadding {
                                                        Right = 5
                                                    },
                                                },
                                                new BeatDivisorControl(beatDivisor)
                                                {
                                                    RelativeSizeAxes = Axes.Both
                                                }
                                            },
                                        },
                                        RowDimensions = new[]
                                        {
                                            new Dimension(GridSizeMode.AutoSize),
                                        },
                                        ColumnDimensions = new[]
                                        {
                                            new Dimension(),
                                            new Dimension(GridSizeMode.Absolute, 90),
                                        }
                                    },
                                }
                            }
                        },
                    },
                    new Drawable[]
                    {
                        mainContent = new Container
                        {
                            Name             = "Main content",
                            RelativeSizeAxes = Axes.Both,
                            Depth            = float.MaxValue,
                            Padding          = new MarginPadding
                            {
                                Horizontal = horizontal_margins,
                                Top        = vertical_margins,
                                Bottom     = vertical_margins
                            },
                            Child = spinner = new LoadingSpinner(true)
                            {
                                State = { Value = Visibility.Visible },
                            },
                        },
                    },
                }
            };
        }
Exemplo n.º 7
0
 public EditorClock(WorkingBeatmap beatmap, BindableBeatDivisor beatDivisor)
     : this(beatmap.Beatmap.ControlPointInfo, beatmap.Track.Length, beatDivisor)
 {
 }
Exemplo n.º 8
0
        private void load([CanBeNull] BindableBeatDivisor beatDivisor)
        {
            if (beatDivisor != null)
            {
                this.beatDivisor.BindTo(beatDivisor);
            }

            Container mainContent;

            LoadingSpinner spinner;

            Children = new Drawable[]
            {
                mainContent = new Container
                {
                    Name             = "Main content",
                    RelativeSizeAxes = Axes.Both,
                    Padding          = new MarginPadding
                    {
                        Horizontal = horizontal_margins,
                        Top        = vertical_margins + timeline_height,
                        Bottom     = vertical_margins
                    },
                    Child = spinner = new LoadingSpinner(true)
                    {
                        State = { Value = Visibility.Visible },
                    },
                },
                new Container
                {
                    Name             = "Timeline",
                    RelativeSizeAxes = Axes.X,
                    Height           = timeline_height,
                    Children         = new Drawable[]
                    {
                        new Box
                        {
                            RelativeSizeAxes = Axes.Both,
                            Colour           = Color4.Black.Opacity(0.5f)
                        },
                        new Container
                        {
                            Name             = "Timeline content",
                            RelativeSizeAxes = Axes.Both,
                            Padding          = new MarginPadding {
                                Horizontal = horizontal_margins, Vertical = vertical_margins
                            },
                            Child = new GridContainer
                            {
                                RelativeSizeAxes = Axes.Both,
                                Content          = new[]
                                {
                                    new Drawable[]
                                    {
                                        timelineContainer = new Container
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Padding          = new MarginPadding {
                                                Right = 5
                                            },
                                        },
                                        new BeatDivisorControl(beatDivisor)
                                        {
                                            RelativeSizeAxes = Axes.Both
                                        }
                                    },
                                },
                                ColumnDimensions = new[]
                                {
                                    new Dimension(),
                                    new Dimension(GridSizeMode.Absolute, 90),
                                }
                            },
                        }
                    }
                },
            };

            LoadComponentAsync(CreateMainContent(), content =>
            {
                spinner.State.Value = Visibility.Hidden;

                mainContent.Add(content);
                content.FadeInFromZero(300, Easing.OutQuint);

                LoadComponentAsync(new TimelineArea
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new[]
                    {
                        new TimelineTickDisplay(),
                        CreateTimelineContent(),
                    }
                }, timelineContainer.Add);
            });
        }
        private void load([CanBeNull] BindableBeatDivisor beatDivisor)
        {
            if (beatDivisor != null)
            {
                this.beatDivisor.BindTo(beatDivisor);
            }

            Container mainContent;

            Children = new Drawable[]
            {
                new GridContainer
                {
                    RelativeSizeAxes = Axes.Both,
                    Content          = new[]
                    {
                        new Drawable[]
                        {
                            new Container
                            {
                                Name             = "Timeline",
                                RelativeSizeAxes = Axes.Both,
                                Children         = new Drawable[]
                                {
                                    new Box
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Colour           = Color4.Black.Opacity(0.5f)
                                    },
                                    new Container
                                    {
                                        Name             = "Timeline content",
                                        RelativeSizeAxes = Axes.Both,
                                        Padding          = new MarginPadding {
                                            Horizontal = horizontal_margins, Vertical = vertical_margins
                                        },
                                        Child = new GridContainer
                                        {
                                            RelativeSizeAxes = Axes.Both,
                                            Content          = new[]
                                            {
                                                new Drawable[]
                                                {
                                                    new Container
                                                    {
                                                        RelativeSizeAxes = Axes.Both,
                                                        Padding          = new MarginPadding {
                                                            Right = 5
                                                        },
                                                        Child = CreateTimeline()
                                                    },
                                                    new BeatDivisorControl(beatDivisor)
                                                    {
                                                        RelativeSizeAxes = Axes.Both
                                                    }
                                                },
                                            },
                                            ColumnDimensions = new[]
                                            {
                                                new Dimension(),
                                                new Dimension(GridSizeMode.Absolute, 90),
                                            }
                                        },
                                    }
                                }
                            }
                        },
                        new Drawable[]
                        {
                            mainContent = new Container
                            {
                                Name             = "Main content",
                                RelativeSizeAxes = Axes.Both,
                                Padding          = new MarginPadding {
                                    Horizontal = horizontal_margins, Vertical = vertical_margins
                                },
                            }
                        }
                    },
                    RowDimensions = new[] { new Dimension(GridSizeMode.Absolute, 110) }
                },
            };

            LoadComponentAsync(CreateMainContent(), content =>
            {
                mainContent.Add(content);
                content.FadeInFromZero(300, Easing.OutQuint);
            });
        }
Exemplo n.º 10
0
 public EditorClock(IBeatmap beatmap, BindableBeatDivisor beatDivisor)
     : this(beatmap.ControlPointInfo, beatDivisor)
 {
 }
Exemplo n.º 11
0
        public EditorClock(ControlPointInfo controlPointInfo, BindableBeatDivisor beatDivisor)
        {
            this.beatDivisor = beatDivisor;

            ControlPointInfo = controlPointInfo;
        }
Exemplo n.º 12
0
        private void load(OverlayColourProvider colourProvider, [CanBeNull] BindableBeatDivisor beatDivisor)
        {
            if (beatDivisor != null)
            {
                this.beatDivisor.BindTo(beatDivisor);
            }

            Child = new GridContainer
            {
                RelativeSizeAxes = Axes.Both,
                RowDimensions    = new[]
                {
                    new Dimension(GridSizeMode.AutoSize),
                    new Dimension(),
                },
                Content = new[]
                {
                    new Drawable[]
                    {
                        new Container
                        {
                            Name             = "Timeline",
                            RelativeSizeAxes = Axes.X,
                            AutoSizeAxes     = Axes.Y,
                            Children         = new Drawable[]
                            {
                                new Box
                                {
                                    RelativeSizeAxes = Axes.Both,
                                    Colour           = colourProvider.Background4
                                },
                                new Container
                                {
                                    Name             = "Timeline content",
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Padding          = new MarginPadding {
                                        Horizontal = padding, Top = padding
                                    },
                                    Child = new GridContainer
                                    {
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Content          = new[]
                                        {
                                            new Drawable[]
                                            {
                                                timelineContainer = new Container
                                                {
                                                    RelativeSizeAxes = Axes.X,
                                                    AutoSizeAxes     = Axes.Y,
                                                    Padding          = new MarginPadding {
                                                        Right = 5
                                                    },
                                                },
                                                new BeatDivisorControl(beatDivisor)
                                                {
                                                    RelativeSizeAxes = Axes.Both
                                                }
                                            },
                                        },
                                        RowDimensions = new[]
                                        {
                                            new Dimension(GridSizeMode.AutoSize),
                                        },
                                        ColumnDimensions = new[]
                                        {
                                            new Dimension(),
                                            new Dimension(GridSizeMode.Absolute, 90),
                                        }
                                    },
                                }
                            }
                        },
                    },
                    new Drawable[]
                    {
                        mainContent = new Container
                        {
                            Name             = "Main content",
                            RelativeSizeAxes = Axes.Both,
                            Depth            = float.MaxValue,
                            Child            = spinner = new LoadingSpinner(true)
                            {
                                State = { Value = Visibility.Visible },
                            },
                        },
                    },
                }
            };
        }