mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 04:13:11 +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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -100,7 +101,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
public void TestGlobalScoresDisplay()
|
public void TestGlobalScoresDisplay()
|
||||||
{
|
{
|
||||||
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Global);
|
AddStep(@"Set scope", () => leaderboard.Scope = BeatmapLeaderboardScope.Global);
|
||||||
AddStep(@"New Scores", () => leaderboard.Scores = generateSampleScores(null));
|
AddStep(@"New Scores", () => leaderboard.SetScores(generateSampleScores(null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -422,6 +423,8 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
{
|
{
|
||||||
PlaceholderState = state;
|
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());
|
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.BeatmapInfo = beatmapInfo;
|
||||||
leaderboard.RefetchScores(); // Required in the case that the beatmap hasn't changed
|
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
|
public ICollection<TScoreInfo> Scores
|
||||||
{
|
{
|
||||||
get => scores;
|
get => scores;
|
||||||
set
|
protected set
|
||||||
{
|
{
|
||||||
scores = value;
|
scores = value;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user