1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-20 02:22:55 +08:00
osu-lazer/osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs

95 lines
4.0 KiB
C#
Raw Normal View History

2017-05-03 14:50:42 +08: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;
2017-08-23 12:42:11 +08:00
using osu.Game.Rulesets.Mania;
2017-05-03 14:50:42 +08:00
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using OpenTK;
using OpenTK.Graphics;
2017-05-03 14:50:42 +08:00
namespace osu.Desktop.Tests.Visual
2017-05-03 14:50:42 +08:00
{
internal class TestCaseManiaHitObjects : OsuTestCase
2017-05-03 14:50:42 +08:00
{
public TestCaseManiaHitObjects()
2017-05-03 14:50:42 +08:00
{
Add(new FillFlowContainer
2017-05-03 14:50:42 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
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 14:50:42 +08:00
{
new Container
2017-05-03 14:50:42 +08:00
{
Name = "Normal note column",
2017-05-03 14:50:42 +08:00
Anchor = Anchor.Centre,
2017-05-04 14:36:37 +08:00
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Width = 50,
Children = new[]
{
2017-05-09 19:55:20 +08:00
new Container
{
2017-05-09 19:55:20 +08:00
Name = "Timing section",
RelativeSizeAxes = Axes.Both,
2017-06-07 14:32:50 +08:00
RelativeChildSize = new Vector2(1, 10000),
2017-05-09 19:55:20 +08:00
Children = new[]
{
new DrawableNote(new Note(), ManiaAction.Key1)
{
Y = 5000,
LifetimeStart = double.MinValue,
LifetimeEnd = double.MaxValue,
AccentColour = Color4.Red
},
new DrawableNote(new Note(), ManiaAction.Key1)
{
Y = 6000,
LifetimeStart = double.MinValue,
LifetimeEnd = double.MaxValue,
AccentColour = Color4.Red
}
2017-05-09 19:55:20 +08:00
}
}
}
},
new Container
{
Name = "Hold note column",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
Width = 50,
Children = new[]
{
2017-05-09 19:55:20 +08:00
new Container
{
2017-05-09 19:55:20 +08:00
Name = "Timing section",
RelativeSizeAxes = Axes.Both,
2017-06-07 14:32:50 +08:00
RelativeChildSize = new Vector2(1, 10000),
2017-05-09 19:55:20 +08:00
Children = new[]
{
new DrawableHoldNote(new HoldNote(), ManiaAction.Key1)
2017-05-09 19:55:20 +08:00
{
Y = 5000,
2017-09-11 03:34:30 +08:00
Height = 1000,
LifetimeStart = double.MinValue,
LifetimeEnd = double.MaxValue,
AccentColour = Color4.Red
}
2017-05-09 19:55:20 +08:00
}
}
}
2017-05-03 14:50:42 +08:00
}
}
});
}
}
}