1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-10 03:57:20 +08:00

Hide pp column if map is loved or qualified

This commit is contained in:
TheWildTree 2020-02-26 21:36:52 +01:00
parent beb18006da
commit 397e35d0a0
2 changed files with 20 additions and 19 deletions

View File

@ -88,11 +88,10 @@ 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)));
columns.AddRange(new[] if (score.PP.HasValue)
{ columns.Add(new TableColumn("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)));
new TableColumn("pp", Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)),
new TableColumn("mods", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)), columns.Add(new TableColumn("mods", Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
});
return columns.ToArray(); return columns.ToArray();
} }
@ -150,24 +149,25 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}); });
} }
content.AddRange(new Drawable[] if (score.PP.HasValue)
{ {
new OsuSpriteText content.Add(new OsuSpriteText
{ {
Text = $@"{score.PP ?? 0:N0}", Text = $@"{score.PP:N0}",
Font = OsuFont.GetFont(size: text_size) Font = OsuFont.GetFont(size: text_size)
}, });
new FillFlowContainer }
content.Add(new FillFlowContainer
{
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(1),
ChildrenEnumerable = score.Mods.Select(m => new ModIcon(m)
{ {
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Spacing = new Vector2(1), Scale = new Vector2(0.3f)
ChildrenEnumerable = score.Mods.Select(m => new ModIcon(m) })
{
AutoSizeAxes = Axes.Both,
Scale = new Vector2(0.3f)
})
},
}); });
return content.ToArray(); return content.ToArray();

View File

@ -96,7 +96,8 @@ 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.Text = $@"{value.PP ?? 0:N0}"; ppColumn.Alpha = value.PP.HasValue ? 1 : 0;
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));
modsColumn.Mods = value.Mods; modsColumn.Mods = value.Mods;