mirror of https://github.com/ppy/osu
Fix panel depth ordering
This commit is contained in:
parent
ec16b0fc5a
commit
55196efe6e
|
@ -211,6 +211,22 @@ private class Flow : FillFlowContainer<ScorePanelTrackingContainer>
|
|||
private IEnumerable<ScorePanelTrackingContainer> applySorting(IEnumerable<Drawable> drawables) => drawables.OfType<ScorePanelTrackingContainer>()
|
||||
.OrderByDescending(s => s.Panel.Score.TotalScore)
|
||||
.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
|
||||
|
|
Loading…
Reference in New Issue