public void SetUpSteps()
        {
            AddStep("create beatmap", () =>
            {
                Beatmap.Value = CreateWorkingBeatmap(new Beatmap
                {
                    BeatmapInfo =
                    {
                        Ruleset = new OsuRuleset().RulesetInfo
                    },
                    HitObjects = new List <HitObject>
                    {
                        new HitCircle
                        {
                            Position = new Vector2(256, 192), Scale = 0.5f
                        },
                        new HitCircle {
                            Position = new Vector2(344, 148), Scale = 0.5f
                        },
                        new Slider
                        {
                            Position = new Vector2(128, 256),
                            Path     = new SliderPath(PathType.Linear, new[]
                            {
                                Vector2.Zero,
                                new Vector2(216, 0),
                            }),
                            Scale = 0.5f,
                        }
                    },
                });
            });

            AddStep("Create composer", () =>
            {
                Child = editorBeatmapContainer = new EditorBeatmapContainer(Beatmap.Value)
                {
                    Child = hitObjectComposer = new OsuHitObjectComposer(new OsuRuleset())
                    {
                        // force the composer to fully overlap the playfield area by setting a 4:3 aspect ratio.
                        FillMode        = FillMode.Fit,
                        FillAspectRatio = 4 / 3f
                    }
                };
            });
        }
Exemple #2
0
        public void SetUpSteps()
        {
            AddStep("create beatmap", () =>
            {
                Beatmap.Value = CreateWorkingBeatmap(new Beatmap
                {
                    BeatmapInfo =
                    {
                        Ruleset = new OsuRuleset().RulesetInfo
                    },
                    HitObjects = new List <HitObject>
                    {
                        new HitCircle
                        {
                            Position = new Vector2(256, 192), Scale = 0.5f
                        },
                        new HitCircle {
                            Position = new Vector2(344, 148), Scale = 0.5f
                        },
                        new Slider
                        {
                            Position = new Vector2(128, 256),
                            Path     = new SliderPath(PathType.Linear, new[]
                            {
                                Vector2.Zero,
                                new Vector2(216, 0),
                            }),
                            Scale = 0.5f,
                        }
                    },
                });
            });

            AddStep("Create composer", () =>
            {
                Child = editorBeatmapContainer = new EditorBeatmapContainer(Beatmap.Value)
                {
                    Child = hitObjectComposer = new OsuHitObjectComposer(new OsuRuleset())
                };
            });
        }