2018-01-05 19:21:19 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-12-01 23:26:02 +08:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2018-03-02 14:34:31 +08:00
|
|
|
using NUnit.Framework;
|
2018-01-11 15:51:46 +08:00
|
|
|
using osu.Framework.Allocation;
|
2017-12-01 23:26:02 +08:00
|
|
|
using OpenTK;
|
2018-01-30 17:22:40 +08:00
|
|
|
using osu.Game.Beatmaps;
|
2018-02-22 13:22:04 +08:00
|
|
|
using osu.Game.Rulesets.Edit;
|
2017-12-11 21:20:07 +08:00
|
|
|
using osu.Game.Rulesets.Edit.Layers.Selection;
|
2018-02-20 12:50:55 +08:00
|
|
|
using osu.Game.Rulesets.Objects;
|
|
|
|
using osu.Game.Rulesets.Osu;
|
2017-12-01 23:26:02 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Edit;
|
2018-02-20 17:01:45 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Edit.Layers.Selection;
|
|
|
|
using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays;
|
2017-12-01 23:26:02 +08:00
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2018-02-20 12:50:55 +08:00
|
|
|
using osu.Game.Tests.Beatmaps;
|
2017-12-01 23:26:02 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
{
|
2018-03-02 14:34:31 +08:00
|
|
|
[TestFixture]
|
2017-12-08 16:41:10 +08:00
|
|
|
public class TestCaseEditorSelectionLayer : OsuTestCase
|
2017-12-01 23:26:02 +08:00
|
|
|
{
|
2018-02-12 15:02:42 +08:00
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
{
|
2018-02-12 17:35:01 +08:00
|
|
|
typeof(SelectionBox),
|
2018-02-12 17:19:55 +08:00
|
|
|
typeof(SelectionLayer),
|
2018-02-20 17:01:45 +08:00
|
|
|
typeof(CaptureBox),
|
|
|
|
typeof(HitObjectComposer),
|
|
|
|
typeof(OsuHitObjectComposer),
|
|
|
|
typeof(HitObjectOverlayLayer),
|
|
|
|
typeof(OsuHitObjectOverlayLayer),
|
|
|
|
typeof(HitObjectOverlay),
|
|
|
|
typeof(HitCircleOverlay),
|
|
|
|
typeof(SliderOverlay),
|
|
|
|
typeof(SliderCircleOverlay)
|
2018-02-12 15:02:42 +08:00
|
|
|
};
|
2017-12-01 23:26:02 +08:00
|
|
|
|
2018-01-11 15:51:46 +08:00
|
|
|
[BackgroundDependencyLoader]
|
2018-02-20 12:50:55 +08:00
|
|
|
private void load(OsuGameBase osuGame)
|
2017-12-01 23:26:02 +08:00
|
|
|
{
|
2018-02-20 12:50:55 +08:00
|
|
|
osuGame.Beatmap.Value = new TestWorkingBeatmap(new Beatmap
|
2018-01-11 15:51:46 +08:00
|
|
|
{
|
2018-02-20 12:50:55 +08:00
|
|
|
HitObjects = new List<HitObject>
|
2018-01-11 15:51:46 +08:00
|
|
|
{
|
2018-02-20 12:50:55 +08:00
|
|
|
new HitCircle { Position = new Vector2(256, 192), Scale = 0.5f },
|
|
|
|
new HitCircle { Position = new Vector2(344, 148), Scale = 0.5f },
|
|
|
|
new Slider
|
|
|
|
{
|
2018-02-23 20:03:45 +08:00
|
|
|
Position = new Vector2(128, 256),
|
2018-02-20 12:50:55 +08:00
|
|
|
ControlPoints = new List<Vector2>
|
|
|
|
{
|
2018-02-23 20:03:45 +08:00
|
|
|
Vector2.Zero,
|
|
|
|
new Vector2(216, 0),
|
2018-02-20 12:50:55 +08:00
|
|
|
},
|
|
|
|
Distance = 400,
|
|
|
|
Velocity = 1,
|
|
|
|
TickDistance = 100,
|
|
|
|
Scale = 0.5f,
|
|
|
|
}
|
2018-01-11 15:51:46 +08:00
|
|
|
},
|
2018-02-20 12:50:55 +08:00
|
|
|
});
|
2018-01-30 17:22:40 +08:00
|
|
|
|
2018-02-20 12:50:55 +08:00
|
|
|
Child = new OsuHitObjectComposer(new OsuRuleset());
|
2017-12-01 23:26:02 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|