mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:05:29 +08:00
Adjust test scene to see graph flickering
This commit is contained in:
parent
9f6304b9ab
commit
9d10d93085
@ -13,22 +13,20 @@ namespace osu.Game.Tests.Visual.Online
|
||||
[TestFixture]
|
||||
public partial class TestSceneGraph : OsuTestScene
|
||||
{
|
||||
private readonly BarGraph graph;
|
||||
|
||||
public TestSceneGraph()
|
||||
{
|
||||
BarGraph graph;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
graph = new BarGraph
|
||||
Child = graph = new BarGraph
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(0.5f),
|
||||
},
|
||||
};
|
||||
|
||||
AddStep("values from 1-10", () => graph.Values = Enumerable.Range(1, 10).Select(i => (float)i));
|
||||
AddStep("small values", () => graph.Values = Enumerable.Range(1, 10).Select(i => i * 0.01f).Concat(new[] { 100f }));
|
||||
AddStep("values from 1-100", () => graph.Values = Enumerable.Range(1, 100).Select(i => (float)i));
|
||||
AddStep("reversed values from 1-10", () => graph.Values = Enumerable.Range(1, 10).Reverse().Select(i => (float)i));
|
||||
AddStep("empty values", () => graph.Values = Array.Empty<float>());
|
||||
@ -37,5 +35,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
AddStep("Left to right", () => graph.Direction = BarDirection.LeftToRight);
|
||||
AddStep("Right to left", () => graph.Direction = BarDirection.RightToLeft);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
graph.MoveToY(-10, 1000).Then().MoveToY(10, 1000).Loop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user