1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 20:33:01 +08:00

Check beatmap ranking status instead of the pp value

This commit is contained in:
TheWildTree 2020-02-28 21:58:37 +01:00
parent 397e35d0a0
commit d71b516902
2 changed files with 9 additions and 4 deletions

View File

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Extensions;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -28,6 +29,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly FillFlowContainer backgroundFlow;
private Color4 highAccuracyColour;
private bool isBeatmapRanked;
public ScoreTable()
{
@ -65,7 +67,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
for (int i = 0; i < value.Count; i++)
backgroundFlow.Add(new ScoreTableRowBackground(i, value[i], row_height));
Columns = createHeaders(value[0]);
isBeatmapRanked = value.First().Beatmap.Status == BeatmapSetOnlineStatus.Ranked;
Columns = createHeaders(value.First());
Content = value.Select((s, i) => createContent(i, s)).ToArray().ToRectangular();
}
}
@ -88,7 +92,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
columns.Add(new TableColumn(score.SortedStatistics.LastOrDefault().Key.GetDescription(), Anchor.CentreLeft, new Dimension(GridSizeMode.Distributed, minSize: 45, maxSize: 95)));
if (score.PP.HasValue)
if (isBeatmapRanked)
columns.Add(new TableColumn("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)));
columns.Add(new TableColumn("mods", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
@ -149,7 +153,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
});
}
if (score.PP.HasValue)
if (isBeatmapRanked)
{
content.Add(new OsuSpriteText
{

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Mods;
@ -96,7 +97,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
totalScoreColumn.Text = $@"{value.TotalScore:N0}";
accuracyColumn.Text = value.DisplayAccuracy;
maxComboColumn.Text = $@"{value.MaxCombo:N0}x";
ppColumn.Alpha = value.PP.HasValue ? 1 : 0;
ppColumn.Alpha = value.Beatmap.Status == BeatmapSetOnlineStatus.Ranked ? 1 : 0;
ppColumn.Text = $@"{value.PP:N0}";
statisticsColumns.ChildrenEnumerable = value.SortedStatistics.Select(kvp => createStatisticsColumn(kvp.Key, kvp.Value));