mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add to more places
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -38,6 +39,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
private readonly FillFlowContainer<InfoColumn> statisticsColumns;
|
||||
private readonly ModsInfoColumn modsColumn;
|
||||
|
||||
[Resolved]
|
||||
private ScoreManager scoreManager { get; set; }
|
||||
|
||||
public TopScoreStatisticsSection()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
@ -87,6 +91,15 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
if (score != null)
|
||||
totalScoreColumn.Current = scoreManager.GetTotalScoreString(score);
|
||||
}
|
||||
|
||||
private ScoreInfo score;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the score to be displayed.
|
||||
/// </summary>
|
||||
@ -94,7 +107,11 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
set
|
||||
{
|
||||
totalScoreColumn.Text = $@"{value.TotalScore:N0}";
|
||||
if (score == value)
|
||||
return;
|
||||
|
||||
score = value;
|
||||
|
||||
accuracyColumn.Text = value.DisplayAccuracy;
|
||||
maxComboColumn.Text = $@"{value.MaxCombo:N0}x";
|
||||
ppColumn.Alpha = value.Beatmap?.Status == BeatmapSetOnlineStatus.Ranked ? 1 : 0;
|
||||
@ -102,6 +119,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
|
||||
statisticsColumns.ChildrenEnumerable = value.SortedStatistics.Select(kvp => createStatisticsColumn(kvp.Key, kvp.Value));
|
||||
modsColumn.Mods = value.Mods;
|
||||
|
||||
if (IsLoaded)
|
||||
totalScoreColumn.Current = scoreManager.GetTotalScoreString(value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,6 +210,12 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
set => text.Text = value;
|
||||
}
|
||||
|
||||
public Bindable<string> Current
|
||||
{
|
||||
get => text.Current;
|
||||
set => text.Current = value;
|
||||
}
|
||||
}
|
||||
|
||||
private class ModsInfoColumn : InfoColumn
|
||||
|
Reference in New Issue
Block a user