Use existing instance of beatmap rather than adding more resources

This commit is contained in:
smoogipoo
2018-06-13 15:09:03 +09:00
committed by Dean Herbert
parent ca3186f34c
commit 6c100caba7
3 changed files with 60 additions and 15 deletions

View File

@ -10,7 +10,6 @@ using osu.Framework.Graphics.Audio;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
{
@ -20,22 +19,14 @@ namespace osu.Game.Tests.Visual
[BackgroundDependencyLoader]
private void load()
{
Beatmap.Value = new WaveformTestBeatmap();
FillFlowContainer flow;
Child = flow = new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 10),
Children = new Drawable[]
{
new MusicController
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Y = 100,
State = Visibility.Visible
},
}
};
for (int i = 1; i <= 16; i *= 2)
@ -44,10 +35,9 @@ namespace osu.Game.Tests.Visual
{
RelativeSizeAxes = Axes.Both,
Resolution = 1f / i,
Waveform = Beatmap.Value.Waveform,
};
Beatmap.ValueChanged += b => newDisplay.Waveform = b.Waveform;
flow.Add(new Container
{
RelativeSizeAxes = Axes.X,