mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update test scene
This commit is contained in:
@ -13,9 +13,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Osu;
|
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -38,13 +36,10 @@ namespace osu.Game.Tests.Visual.Editor
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
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);
|
Beatmap.Value = new WaveformTestBeatmap(audio);
|
||||||
|
|
||||||
|
var editorBeatmap = new EditorBeatmap<HitObject>((Beatmap<HitObject>)Beatmap.Value.Beatmap);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
@ -60,6 +55,7 @@ namespace osu.Game.Tests.Visual.Editor
|
|||||||
},
|
},
|
||||||
new TimelineArea
|
new TimelineArea
|
||||||
{
|
{
|
||||||
|
Child = new TimelineHitObjectDisplay(editorBeatmap),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
|
@ -36,18 +36,15 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
this.adjustableClock = adjustableClock;
|
this.adjustableClock = adjustableClock;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Add(waveform = new WaveformGraph
|
||||||
{
|
{
|
||||||
waveform = new WaveformGraph
|
RelativeSizeAxes = Axes.Both,
|
||||||
{
|
Colour = colours.Blue.Opacity(0.2f),
|
||||||
RelativeSizeAxes = Axes.Both,
|
LowColour = colours.BlueLighter,
|
||||||
Colour = colours.Blue.Opacity(0.2f),
|
MidColour = colours.BlueDark,
|
||||||
LowColour = colours.BlueLighter,
|
HighColour = colours.BlueDarker,
|
||||||
MidColour = colours.BlueDark,
|
Depth = float.MaxValue
|
||||||
HighColour = colours.BlueDarker,
|
});
|
||||||
Depth = float.MaxValue
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// We don't want the centre marker to scroll
|
// We don't want the centre marker to scroll
|
||||||
AddInternal(new CentreMarker());
|
AddInternal(new CentreMarker());
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
public class TimelineArea : Container
|
public class TimelineArea : Container
|
||||||
{
|
{
|
||||||
private Timeline timeline;
|
private readonly Timeline timeline = new Timeline { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
protected override Container<Drawable> Content => timeline;
|
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[]
|
ColumnDimensions = new[]
|
||||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
public TimelineHitObjectDisplay(IEditorBeatmap beatmap)
|
public TimelineHitObjectDisplay(IEditorBeatmap beatmap)
|
||||||
{
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,6 @@ namespace osu.Game.Screens.Edit.Compose
|
|||||||
return new ScreenWhiteBox.UnderConstructionMessage(ruleset == null ? "This beatmap" : $"{ruleset.Description}'s composer");
|
return new ScreenWhiteBox.UnderConstructionMessage(ruleset == null ? "This beatmap" : $"{ruleset.Description}'s composer");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap)
|
protected override Drawable CreateTimelineContent() => new TimelineHitObjectDisplay(composer.EditorBeatmap);
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user