mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:12:56 +08:00
Make score setter private
This commit is contained in:
parent
b85b2c01fb
commit
661fec7c8a
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
@ -100,7 +101,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
public void TestGlobalScoresDisplay()
|
||||
{
|
||||
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Global);
|
||||
AddStep(@"New Scores", () => leaderboard.Scores = generateSampleScores(null));
|
||||
AddStep(@"New Scores", () => leaderboard.SetScores(generateSampleScores(null)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -422,6 +423,8 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
{
|
||||
PlaceholderState = state;
|
||||
}
|
||||
|
||||
public void SetScores(ICollection<ScoreInfo> scores) => Scores = scores;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,9 +128,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
scoreManager.Undelete(r.All<ScoreInfo>().Where(s => s.DeletePending).ToList());
|
||||
});
|
||||
|
||||
leaderboard.Scores = null;
|
||||
leaderboard.FinishTransforms(true); // After setting scores, we may be waiting for transforms to expire drawables
|
||||
|
||||
leaderboard.BeatmapInfo = beatmapInfo;
|
||||
leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed
|
||||
});
|
||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
public ICollection<TScoreInfo> Scores
|
||||
{
|
||||
get => scores;
|
||||
set
|
||||
protected set
|
||||
{
|
||||
scores = value;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user