mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Make beatmap scores also support null position
This commit is contained in:
@ -17,7 +17,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
private readonly Box background;
|
||||
|
||||
public DrawableTopScore(ScoreInfo score, int position = 1)
|
||||
public DrawableTopScore(ScoreInfo score, int? position = 1)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -71,10 +70,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
topScoresContainer.Add(new DrawableTopScore(topScore));
|
||||
|
||||
if (userScoreInfo != null && userScoreInfo.OnlineScoreID != topScore.OnlineScoreID)
|
||||
{
|
||||
Debug.Assert(userScore.Position != null);
|
||||
topScoresContainer.Add(new DrawableTopScore(userScoreInfo, userScore.Position.Value));
|
||||
}
|
||||
topScoresContainer.Add(new DrawableTopScore(userScoreInfo, userScore.Position));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -112,9 +112,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
};
|
||||
}
|
||||
|
||||
public int ScorePosition
|
||||
public int? ScorePosition
|
||||
{
|
||||
set => rankText.Text = $"#{value}";
|
||||
set => rankText.Text = value == null ? "-" : $"#{value}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user