Example #1
0
        private void load(AudioManager audio)
        {
            Beatmap.Value = new WaveformTestBeatmap(audio);

            var editorBeatmap = new EditorBeatmap((Beatmap <HitObject>)Beatmap.Value.Beatmap, BeatDivisor);

            Dependencies.Cache(editorBeatmap);
            Dependencies.CacheAs <IBeatSnapProvider>(editorBeatmap);

            AddRange(new Drawable[]
            {
                new FillFlowContainer
                {
                    AutoSizeAxes = Axes.Both,
                    Direction    = FillDirection.Vertical,
                    Spacing      = new Vector2(0, 5),
                    Children     = new Drawable[]
                    {
                        new StartStopButton(),
                        new AudioVisualiser(),
                    }
                },
                TimelineArea = new TimelineArea
                {
                    Child            = CreateTestComponent(),
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.X,
                    Size             = new Vector2(0.8f, 100),
                }
            });
        }
Example #2
0
        private void load(AudioManager audio)
        {
            Beatmap.Value = new WaveformTestBeatmap(audio);

            var playable = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);

            EditorBeatmap = new EditorBeatmap(playable);

            Dependencies.Cache(EditorBeatmap);
            Dependencies.CacheAs <IBeatSnapProvider>(EditorBeatmap);

            Composer = playable.BeatmapInfo.Ruleset.CreateInstance().CreateHitObjectComposer().With(d => d.Alpha = 0);

            AddRange(new Drawable[]
            {
                EditorBeatmap,
                Composer,
                new FillFlowContainer
                {
                    AutoSizeAxes = Axes.Both,
                    Direction    = FillDirection.Vertical,
                    Spacing      = new Vector2(0, 5),
                    Children     = new Drawable[]
                    {
                        new StartStopButton(),
                        new AudioVisualiser(),
                    }
                },
                TimelineArea = new TimelineArea(CreateTestComponent())
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                }
            });
        }
Example #3
0
 protected virtual void OnTimelineLoaded(TimelineArea timelineArea)
 {
 }
Example #4
0
 protected override void OnTimelineLoaded(TimelineArea timelineArea)
 {
     base.OnTimelineLoaded(timelineArea);
     timelineArea.Timeline.Zoom = timelineArea.Timeline.MinZoom;
 }
Example #5
0
        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 = timelineArea = CreateTimelineArea()
                                                    },
                                                    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);

                LoadComponentAsync(CreateTimelineContent(), timelineArea.Add);
            });
        }