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:
parent
397e35d0a0
commit
d71b516902
@ -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
|
||||
{
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user