Add initial implementation of the statistics panel

This commit is contained in:
smoogipoo
2020-06-15 22:45:18 +09:00
parent 900da88498
commit 89b54be673
7 changed files with 179 additions and 2 deletions

View File

@ -1,12 +1,14 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Rulesets.Osu.Statistics;
using osuTK;
using osuTK.Graphics;
@ -38,7 +40,7 @@ namespace osu.Game.Tests.Visual.Ranking
{
Position = new Vector2(500, 300),
},
heatmap = new Heatmap
heatmap = new Heatmap(new List<HitOffset>())
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -0,0 +1,24 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Rulesets.Osu;
using osu.Game.Scoring;
using osu.Game.Screens.Ranking.Statistics;
namespace osu.Game.Tests.Visual.Ranking
{
public class TestScreenStatisticsPanel : OsuTestScene
{
[Test]
public void TestScore()
{
loadPanel(new TestScoreInfo(new OsuRuleset().RulesetInfo));
}
private void loadPanel(ScoreInfo score) => AddStep("load panel", () =>
{
Child = new StatisticsPanel(score);
});
}
}