Add visual test coverage for displaying hitcircles with high combo index
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.1 KiB |
@ -1,3 +1,4 @@
|
|||||||
[General]
|
[General]
|
||||||
Version: latest
|
Version: latest
|
||||||
HitCircleOverlayAboveNumber: 0
|
HitCircleOverlayAboveNumber: 0
|
||||||
|
HitCirclePrefix: display
|
@ -34,6 +34,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
AddStep("Hit Big Stream", () => SetContents(_ => testStream(2, true)));
|
AddStep("Hit Big Stream", () => SetContents(_ => testStream(2, true)));
|
||||||
AddStep("Hit Medium Stream", () => SetContents(_ => testStream(5, true)));
|
AddStep("Hit Medium Stream", () => SetContents(_ => testStream(5, true)));
|
||||||
AddStep("Hit Small Stream", () => SetContents(_ => testStream(7, true)));
|
AddStep("Hit Small Stream", () => SetContents(_ => testStream(7, true)));
|
||||||
|
AddStep("High combo index", () => SetContents(_ => testSingle(2, true, comboIndex: 15)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -66,12 +67,12 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
AddStep("Hit Big Single", () => SetContents(_ => testSingle(2, true)));
|
AddStep("Hit Big Single", () => SetContents(_ => testSingle(2, true)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable testSingle(float circleSize, bool auto = false, double timeOffset = 0, Vector2? positionOffset = null)
|
private Drawable testSingle(float circleSize, bool auto = false, double timeOffset = 0, Vector2? positionOffset = null, int comboIndex = 0)
|
||||||
{
|
{
|
||||||
var playfield = new TestOsuPlayfield();
|
var playfield = new TestOsuPlayfield();
|
||||||
|
|
||||||
for (double t = timeOffset; t < timeOffset + 60000; t += 2000)
|
for (double t = timeOffset; t < timeOffset + 60000; t += 2000)
|
||||||
playfield.Add(createSingle(circleSize, auto, t, positionOffset));
|
playfield.Add(createSingle(circleSize, auto, t, positionOffset, comboIndex: comboIndex));
|
||||||
|
|
||||||
return playfield;
|
return playfield;
|
||||||
}
|
}
|
||||||
@ -84,14 +85,14 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
for (int i = 0; i <= 1000; i += 100)
|
for (int i = 0; i <= 1000; i += 100)
|
||||||
{
|
{
|
||||||
playfield.Add(createSingle(circleSize, auto, i, pos, hitOffset));
|
playfield.Add(createSingle(circleSize, auto, i, pos, hitOffset, i / 100 - 1));
|
||||||
pos.X += 50;
|
pos.X += 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
return playfield;
|
return playfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TestDrawableHitCircle createSingle(float circleSize, bool auto, double timeOffset, Vector2? positionOffset, double hitOffset = 0)
|
private TestDrawableHitCircle createSingle(float circleSize, bool auto, double timeOffset, Vector2? positionOffset, double hitOffset = 0, int comboIndex = 0)
|
||||||
{
|
{
|
||||||
positionOffset ??= Vector2.Zero;
|
positionOffset ??= Vector2.Zero;
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
StartTime = Time.Current + 1000 + timeOffset,
|
StartTime = Time.Current + 1000 + timeOffset,
|
||||||
Position = OsuPlayfield.BASE_SIZE / 4 + positionOffset.Value,
|
Position = OsuPlayfield.BASE_SIZE / 4 + positionOffset.Value,
|
||||||
|
IndexInCurrentCombo = comboIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
circle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = circleSize });
|
circle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = circleSize });
|
||||||
|