2018-04-13 17:19:50 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using OpenTK;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
using osu.Game.Screens.Edit.Screens.Compose.Timeline;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
{
|
|
|
|
[TestFixture]
|
2018-05-23 11:00:11 +08:00
|
|
|
public class TestCaseEditorComposeTimeline : EditorClockTestCase
|
2018-04-13 17:19:50 +08:00
|
|
|
{
|
2018-05-16 16:54:44 +08:00
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(TimelineArea), typeof(Timeline), typeof(BeatmapWaveformGraph), typeof(TimelineButton) };
|
2018-04-13 17:19:50 +08:00
|
|
|
|
2018-05-23 11:00:11 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuGameBase osuGame)
|
2018-04-13 17:19:50 +08:00
|
|
|
{
|
2018-05-23 11:00:11 +08:00
|
|
|
TimelineArea timelineArea;
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
new MusicController
|
|
|
|
{
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
State = Visibility.Visible
|
|
|
|
},
|
2018-05-16 16:54:44 +08:00
|
|
|
timelineArea = new TimelineArea
|
2018-04-13 17:19:50 +08:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
2018-05-16 16:54:44 +08:00
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
Size = new Vector2(0.8f, 100)
|
2018-04-13 17:19:50 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-05-16 16:54:44 +08:00
|
|
|
timelineArea.Beatmap.BindTo(osuGame.Beatmap);
|
2018-04-13 17:19:50 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|