1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Fix panel depth ordering

This commit is contained in:
smoogipoo 2020-06-19 18:02:54 +09:00
parent ec16b0fc5a
commit 55196efe6e

View File

@ -211,6 +211,22 @@ namespace osu.Game.Screens.Ranking
private IEnumerable<ScorePanelTrackingContainer> applySorting(IEnumerable<Drawable> drawables) => drawables.OfType<ScorePanelTrackingContainer>() private IEnumerable<ScorePanelTrackingContainer> applySorting(IEnumerable<Drawable> drawables) => drawables.OfType<ScorePanelTrackingContainer>()
.OrderByDescending(s => s.Panel.Score.TotalScore) .OrderByDescending(s => s.Panel.Score.TotalScore)
.ThenBy(s => s.Panel.Score.OnlineScoreID); .ThenBy(s => s.Panel.Score.OnlineScoreID);
protected override int Compare(Drawable x, Drawable y)
{
var tX = (ScorePanelTrackingContainer)x;
var tY = (ScorePanelTrackingContainer)y;
int result = tY.Panel.Score.TotalScore.CompareTo(tX.Panel.Score.TotalScore);
if (result != 0)
return result;
if (tX.Panel.Score.OnlineScoreID == null || tY.Panel.Score.OnlineScoreID == null)
return base.Compare(x, y);
return tX.Panel.Score.OnlineScoreID.Value.CompareTo(tY.Panel.Score.OnlineScoreID.Value);
}
} }
private class Scroll : OsuScrollContainer private class Scroll : OsuScrollContainer