2017-05-03 06:50:42 +00:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Game.Rulesets.Mania.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Mania.Objects.Drawables;
|
2017-05-04 09:02:43 +00:00
|
|
|
|
using OpenTK;
|
2017-08-04 06:37:31 +00:00
|
|
|
|
using OpenTK.Graphics;
|
2017-05-03 06:50:42 +00:00
|
|
|
|
|
2017-08-04 06:37:31 +00:00
|
|
|
|
namespace osu.Desktop.Tests.Visual
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
2017-08-04 06:37:31 +00:00
|
|
|
|
internal class TestCaseManiaHitObjects : OsuTestCase
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
2017-07-07 12:05:55 +00:00
|
|
|
|
public TestCaseManiaHitObjects()
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
2017-05-04 09:02:43 +00:00
|
|
|
|
Add(new FillFlowContainer
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
RelativeSizeAxes = Axes.Y,
|
2017-05-04 09:02:43 +00:00
|
|
|
|
Direction = FillDirection.Horizontal,
|
|
|
|
|
Spacing = new Vector2(10, 0),
|
|
|
|
|
// Imagine that the containers containing the drawable notes are the "columns"
|
|
|
|
|
Children = new Drawable[]
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
2017-05-04 09:02:43 +00:00
|
|
|
|
new Container
|
2017-05-03 06:50:42 +00:00
|
|
|
|
{
|
2017-05-09 11:33:59 +00:00
|
|
|
|
Name = "Normal note column",
|
2017-05-03 06:50:42 +00:00
|
|
|
|
Anchor = Anchor.Centre,
|
2017-05-04 06:36:37 +00:00
|
|
|
|
Origin = Anchor.Centre,
|
2017-05-04 09:02:43 +00:00
|
|
|
|
RelativeSizeAxes = Axes.Y,
|
|
|
|
|
Width = 50,
|
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
2017-05-09 11:55:20 +00:00
|
|
|
|
new Container
|
2017-05-09 11:33:59 +00:00
|
|
|
|
{
|
2017-05-09 11:55:20 +00:00
|
|
|
|
Name = "Timing section",
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2017-06-07 06:32:50 +00:00
|
|
|
|
RelativeChildSize = new Vector2(1, 10000),
|
2017-05-09 11:55:20 +00:00
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
2017-05-12 10:10:26 +00:00
|
|
|
|
new DrawableNote(new Note { StartTime = 5000 }) { AccentColour = Color4.Red },
|
|
|
|
|
new DrawableNote(new Note { StartTime = 6000 }) { AccentColour = Color4.Red }
|
2017-05-09 11:55:20 +00:00
|
|
|
|
}
|
2017-05-04 09:02:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
new Container
|
|
|
|
|
{
|
2017-05-09 11:33:59 +00:00
|
|
|
|
Name = "Hold note column",
|
2017-05-04 09:02:43 +00:00
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
RelativeSizeAxes = Axes.Y,
|
|
|
|
|
Width = 50,
|
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
2017-05-09 11:55:20 +00:00
|
|
|
|
new Container
|
2017-05-09 11:33:59 +00:00
|
|
|
|
{
|
2017-05-09 11:55:20 +00:00
|
|
|
|
Name = "Timing section",
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2017-06-07 06:32:50 +00:00
|
|
|
|
RelativeChildSize = new Vector2(1, 10000),
|
2017-05-09 11:55:20 +00:00
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
|
|
|
|
new DrawableHoldNote(new HoldNote
|
|
|
|
|
{
|
|
|
|
|
StartTime = 5000,
|
2017-05-09 12:08:53 +00:00
|
|
|
|
Duration = 1000
|
2017-05-12 10:10:26 +00:00
|
|
|
|
}) { AccentColour = Color4.Red }
|
2017-05-09 11:55:20 +00:00
|
|
|
|
}
|
2017-05-04 09:02:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-05-03 06:50:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|