mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Add draw width statistic to test
This commit is contained in:
parent
39b008b070
commit
43c8d51d02
@ -5,6 +5,7 @@ using System;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Leaderboards;
|
using osu.Game.Online.Leaderboards;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
@ -25,17 +26,22 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Aquamarine);
|
private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Aquamarine);
|
||||||
|
|
||||||
private FillFlowContainer fillFlow = null!;
|
private FillFlowContainer fillFlow = null!;
|
||||||
|
private OsuSpriteText drawWidthText = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Child = fillFlow = new FillFlowContainer
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
fillFlow = new FillFlowContainer
|
||||||
Origin = Anchor.Centre,
|
{
|
||||||
Spacing = new Vector2(0, 10),
|
Anchor = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
Origin = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Y,
|
Spacing = new Vector2(0, 10),
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
},
|
||||||
|
drawWidthText = new OsuSpriteText(),
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var scoreInfo in getTestScores())
|
foreach (var scoreInfo in getTestScores())
|
||||||
@ -50,6 +56,13 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateAfterChildren()
|
||||||
|
{
|
||||||
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
|
drawWidthText.Text = $"DrawWidth: {fillFlow.DrawWidth}";
|
||||||
|
}
|
||||||
|
|
||||||
private static ScoreInfo[] getTestScores()
|
private static ScoreInfo[] getTestScores()
|
||||||
{
|
{
|
||||||
var scores = new[]
|
var scores = new[]
|
||||||
|
Loading…
Reference in New Issue
Block a user