2019-01-24 08:43:03 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-10-25 09:48:11 +00:00
|
|
|
|
2018-10-29 05:07:06 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2018-10-25 09:48:11 +00:00
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
using osu.Game.Rulesets.Edit;
|
2018-11-01 06:38:19 +00:00
|
|
|
using osu.Game.Rulesets.Objects;
|
2018-10-25 09:48:11 +00:00
|
|
|
using osu.Game.Rulesets.Objects.Types;
|
2018-11-07 07:08:56 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders;
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
|
2018-10-25 09:48:11 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
|
|
|
using osu.Game.Tests.Visual;
|
2018-11-20 07:51:59 +00:00
|
|
|
using osuTK;
|
2018-10-25 09:48:11 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Tests
|
|
|
|
{
|
2019-05-14 19:37:25 +00:00
|
|
|
public class TestSceneSliderSelectionBlueprint : SelectionBlueprintTestScene
|
2018-10-25 09:48:11 +00:00
|
|
|
{
|
2018-10-29 06:36:43 +00:00
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
2018-10-29 05:07:06 +00:00
|
|
|
{
|
2018-11-06 08:56:04 +00:00
|
|
|
typeof(SliderSelectionBlueprint),
|
|
|
|
typeof(SliderCircleSelectionBlueprint),
|
2018-10-29 05:07:06 +00:00
|
|
|
typeof(SliderBodyPiece),
|
|
|
|
typeof(SliderCircle),
|
2018-10-31 18:52:24 +00:00
|
|
|
typeof(PathControlPointVisualiser),
|
|
|
|
typeof(PathControlPointPiece)
|
2018-10-29 05:07:06 +00:00
|
|
|
};
|
|
|
|
|
2018-10-25 09:48:11 +00:00
|
|
|
private readonly DrawableSlider drawableObject;
|
|
|
|
|
2019-05-14 19:37:25 +00:00
|
|
|
public TestSceneSliderSelectionBlueprint()
|
2018-10-25 09:48:11 +00:00
|
|
|
{
|
|
|
|
var slider = new Slider
|
|
|
|
{
|
|
|
|
Position = new Vector2(256, 192),
|
2018-11-01 06:38:19 +00:00
|
|
|
Path = new SliderPath(PathType.Bezier, new[]
|
2018-10-25 09:48:11 +00:00
|
|
|
{
|
|
|
|
Vector2.Zero,
|
|
|
|
new Vector2(150, 150),
|
|
|
|
new Vector2(300, 0)
|
2018-11-01 06:38:19 +00:00
|
|
|
})
|
2018-10-25 09:48:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
slider.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = 2 });
|
|
|
|
|
|
|
|
Add(drawableObject = new DrawableSlider(slider));
|
|
|
|
}
|
|
|
|
|
2018-11-07 06:04:48 +00:00
|
|
|
protected override SelectionBlueprint CreateBlueprint() => new SliderSelectionBlueprint(drawableObject);
|
2018-10-25 09:48:11 +00:00
|
|
|
}
|
|
|
|
}
|