1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Update test scene

This commit is contained in:
Dean Herbert 2019-12-06 11:26:50 +09:00
parent 12a9843835
commit 28400aa865
5 changed files with 17 additions and 25 deletions

View File

@ -13,9 +13,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osuTK;
@ -38,13 +36,10 @@ namespace osu.Game.Tests.Visual.Editor
[BackgroundDependencyLoader]
private void load(AudioManager audio)
{
var editorBeatmap = new EditorBeatmap<OsuHitObject>(
(Beatmap<OsuHitObject>)
CreateWorkingBeatmap(new OsuRuleset().RulesetInfo).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, new Mod[] { })
);
Beatmap.Value = new WaveformTestBeatmap(audio);
var editorBeatmap = new EditorBeatmap<HitObject>((Beatmap<HitObject>)Beatmap.Value.Beatmap);
Children = new Drawable[]
{
new FillFlowContainer
@ -60,6 +55,7 @@ namespace osu.Game.Tests.Visual.Editor
},
new TimelineArea
{
Child = new TimelineHitObjectDisplay(editorBeatmap),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,

View File

@ -36,18 +36,15 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
this.adjustableClock = adjustableClock;
Children = new Drawable[]
Add(waveform = new WaveformGraph
{
waveform = new WaveformGraph
{
RelativeSizeAxes = Axes.Both,
Colour = colours.Blue.Opacity(0.2f),
LowColour = colours.BlueLighter,
MidColour = colours.BlueDark,
HighColour = colours.BlueDarker,
Depth = float.MaxValue
},
};
RelativeSizeAxes = Axes.Both,
Colour = colours.Blue.Opacity(0.2f),
LowColour = colours.BlueLighter,
MidColour = colours.BlueDark,
HighColour = colours.BlueDarker,
Depth = float.MaxValue
});
// We don't want the centre marker to scroll
AddInternal(new CentreMarker());

View File

@ -14,7 +14,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
public class TimelineArea : Container
{
private Timeline timeline;
private readonly Timeline timeline = new Timeline { RelativeSizeAxes = Axes.Both };
protected override Container<Drawable> Content => timeline;
@ -111,7 +111,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
}
}
},
timeline = new Timeline { RelativeSizeAxes = Axes.Both }
timeline
},
},
ColumnDimensions = new[]

View File

@ -20,6 +20,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public TimelineHitObjectDisplay(IEditorBeatmap beatmap)
{
RelativeSizeAxes = Axes.Both;
this.beatmap = beatmap;
}

View File

@ -35,9 +35,6 @@ namespace osu.Game.Screens.Edit.Compose
return new ScreenWhiteBox.UnderConstructionMessage(ruleset == null ? "This beatmap" : $"{ruleset.Description}'s composer");
}
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap)
{
RelativeSizeAxes = Axes.Both,
};
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap);
}
}