mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Only show global rankings on results screen when progressing from gameplay
This commit is contained in:
@ -1159,7 +1159,10 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="score">The <see cref="ScoreInfo"/> to be displayed in the results screen.</param>
|
/// <param name="score">The <see cref="ScoreInfo"/> to be displayed in the results screen.</param>
|
||||||
/// <returns>The <see cref="ResultsScreen"/>.</returns>
|
/// <returns>The <see cref="ResultsScreen"/>.</returns>
|
||||||
protected virtual ResultsScreen CreateResults(ScoreInfo score) => new SoloResultsScreen(score, true);
|
protected virtual ResultsScreen CreateResults(ScoreInfo score) => new SoloResultsScreen(score, true)
|
||||||
|
{
|
||||||
|
ShowUserStatistics = true
|
||||||
|
};
|
||||||
|
|
||||||
private void fadeOut(bool instant = false)
|
private void fadeOut(bool instant = false)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,12 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
public partial class SoloResultsScreen : ResultsScreen
|
public partial class SoloResultsScreen : ResultsScreen
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the user's personal statistics should be shown on the extended statistics panel
|
||||||
|
/// after clicking the score panel associated with the <see cref="ResultsScreen.Score"/> being presented.
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowUserStatistics { get; init; }
|
||||||
|
|
||||||
private GetScoresRequest getScoreRequest;
|
private GetScoresRequest getScoreRequest;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
@ -39,13 +45,22 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
soloStatisticsWatcher.RegisterForStatisticsUpdateAfter(Score, update => statisticsUpdate.Value = update);
|
if (ShowUserStatistics)
|
||||||
|
soloStatisticsWatcher.RegisterForStatisticsUpdateAfter(Score, update => statisticsUpdate.Value = update);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override StatisticsPanel CreateStatisticsPanel() => new SoloStatisticsPanel(Score)
|
protected override StatisticsPanel CreateStatisticsPanel()
|
||||||
{
|
{
|
||||||
StatisticsUpdate = { BindTarget = statisticsUpdate }
|
if (ShowUserStatistics)
|
||||||
};
|
{
|
||||||
|
return new SoloStatisticsPanel(Score)
|
||||||
|
{
|
||||||
|
StatisticsUpdate = { BindTarget = statisticsUpdate }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.CreateStatisticsPanel();
|
||||||
|
}
|
||||||
|
|
||||||
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback)
|
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user