mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Apply suggested changes
This commit is contained in:
@ -27,6 +27,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
private bool isLoading;
|
||||
public bool IsLoading
|
||||
{
|
||||
get { return isLoading; }
|
||||
set
|
||||
{
|
||||
if (isLoading == value) return;
|
||||
@ -35,18 +36,33 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
foreground.FadeTo(isLoading ? 1 : 0, fade_duration);
|
||||
loadingAnimation.FadeTo(isLoading ? 1 : 0, fade_duration);
|
||||
}
|
||||
get { return isLoading; }
|
||||
}
|
||||
|
||||
private IEnumerable<OnlineScore> scores;
|
||||
public IEnumerable<OnlineScore> Scores
|
||||
{
|
||||
get { return scores; }
|
||||
set
|
||||
{
|
||||
scores = value;
|
||||
updateScores();
|
||||
var scoresAmount = scores.Count();
|
||||
if (scoresAmount == 0)
|
||||
{
|
||||
CleanAllScores();
|
||||
return;
|
||||
}
|
||||
|
||||
topScore.Score = scores.FirstOrDefault();
|
||||
topScore.Show();
|
||||
|
||||
flow.Clear();
|
||||
|
||||
if (scoresAmount < 2)
|
||||
return;
|
||||
|
||||
for (int i = 1; i < scoresAmount; i++)
|
||||
flow.Add(new DrawableScore(i, scores.ElementAt(i)));
|
||||
}
|
||||
get { return scores; }
|
||||
}
|
||||
|
||||
public ScoresContainer()
|
||||
@ -90,27 +106,6 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
};
|
||||
}
|
||||
|
||||
private void updateScores()
|
||||
{
|
||||
var scoresAmount = scores.Count();
|
||||
if (scoresAmount == 0)
|
||||
{
|
||||
CleanAllScores();
|
||||
return;
|
||||
}
|
||||
|
||||
topScore.Score = scores.FirstOrDefault();
|
||||
topScore.Show();
|
||||
|
||||
flow.Clear();
|
||||
|
||||
if (scoresAmount < 2)
|
||||
return;
|
||||
|
||||
for (int i = 1; i < scoresAmount; i++)
|
||||
flow.Add(new DrawableScore(i, scores.ElementAt(i)));
|
||||
}
|
||||
|
||||
public void CleanAllScores()
|
||||
{
|
||||
topScore.Hide();
|
||||
|
Reference in New Issue
Block a user