Don't present Meh hit windows if it has no value

This commit is contained in:
Andrei Zavatski
2019-08-19 22:45:27 +03:00
parent f1c3a60660
commit 50c47568e4
2 changed files with 49 additions and 24 deletions

View File

@ -14,6 +14,8 @@ using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
using osu.Framework.MathUtils;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Tests.Visual.Gameplay
{
@ -95,7 +97,24 @@ namespace osu.Game.Tests.Visual.Gameplay
private void recreateDisplay(HitWindows hitWindows, float overallDifficulty)
{
hitWindows.SetDifficulty(overallDifficulty);
Clear();
Add(new FillFlowContainer
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Children = new[]
{
new SpriteText { Text = $@"Great: {hitWindows.Great}" },
new SpriteText { Text = $@"Good: {hitWindows.Good}" },
new SpriteText { Text = $@"Meh: {hitWindows.Meh}" },
}
});
Add(display = new DefaultHitErrorDisplay(overallDifficulty, hitWindows)
{
Anchor = Anchor.Centre,