mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Check beatmap ranking status instead of the pp value
This commit is contained in:
@ -7,6 +7,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Extensions;
|
using osu.Framework.Extensions;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
@ -28,6 +29,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
private readonly FillFlowContainer backgroundFlow;
|
private readonly FillFlowContainer backgroundFlow;
|
||||||
|
|
||||||
private Color4 highAccuracyColour;
|
private Color4 highAccuracyColour;
|
||||||
|
private bool isBeatmapRanked;
|
||||||
|
|
||||||
public ScoreTable()
|
public ScoreTable()
|
||||||
{
|
{
|
||||||
@ -65,7 +67,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
for (int i = 0; i < value.Count; i++)
|
for (int i = 0; i < value.Count; i++)
|
||||||
backgroundFlow.Add(new ScoreTableRowBackground(i, value[i], row_height));
|
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();
|
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)));
|
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("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)));
|
||||||
|
|
||||||
columns.Add(new TableColumn("mods", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
|
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
|
content.Add(new OsuSpriteText
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Localisation;
|
using osu.Framework.Localisation;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
@ -96,7 +97,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
|||||||
totalScoreColumn.Text = $@"{value.TotalScore:N0}";
|
totalScoreColumn.Text = $@"{value.TotalScore:N0}";
|
||||||
accuracyColumn.Text = value.DisplayAccuracy;
|
accuracyColumn.Text = value.DisplayAccuracy;
|
||||||
maxComboColumn.Text = $@"{value.MaxCombo:N0}x";
|
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}";
|
ppColumn.Text = $@"{value.PP:N0}";
|
||||||
|
|
||||||
statisticsColumns.ChildrenEnumerable = value.SortedStatistics.Select(kvp => createStatisticsColumn(kvp.Key, kvp.Value));
|
statisticsColumns.ChildrenEnumerable = value.SortedStatistics.Select(kvp => createStatisticsColumn(kvp.Key, kvp.Value));
|
||||||
|
Reference in New Issue
Block a user