mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Reduce casting
This commit is contained in:
@ -118,11 +118,11 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
public override IEnumerable<Drawable> FlowingChildren => applySorting(AliveInternalChildren);
|
public override IEnumerable<Drawable> FlowingChildren => applySorting(AliveInternalChildren);
|
||||||
|
|
||||||
public int GetPanelIndex(ScoreInfo score) => applySorting(Children).OfType<ScorePanel>().TakeWhile(s => s.Score != score).Count();
|
public int GetPanelIndex(ScoreInfo score) => applySorting(Children).TakeWhile(s => s.Score != score).Count();
|
||||||
|
|
||||||
private IEnumerable<Drawable> applySorting(IEnumerable<Drawable> drawables) => drawables.OfType<ScorePanel>()
|
private IEnumerable<ScorePanel> applySorting(IEnumerable<Drawable> drawables) => drawables.OfType<ScorePanel>()
|
||||||
.OrderByDescending(s => s.Score.TotalScore)
|
.OrderByDescending(s => s.Score.TotalScore)
|
||||||
.ThenBy(s => s.Score.OnlineScoreID);
|
.ThenBy(s => s.Score.OnlineScoreID);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Scroll : OsuScrollContainer
|
private class Scroll : OsuScrollContainer
|
||||||
|
Reference in New Issue
Block a user