mirror of
https://github.com/ppy/osu.git
synced 2026-06-02 17:40:43 +08:00
Merge branch 'master' into difficulty-range-from-non-expired-items
This commit is contained in:
@@ -48,6 +48,13 @@ namespace osu.Game.Tests.NonVisual
|
||||
AddUntilStep("no check pending", () => !manager.IsPending);
|
||||
}
|
||||
|
||||
[TearDownSteps]
|
||||
public void TeardownSteps()
|
||||
{
|
||||
// Importantly, this immediately saves the config, which cancels any pending background save.
|
||||
AddStep("dispose config manager", () => config.Dispose());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates should be checked when the release stream is changed.
|
||||
/// </summary>
|
||||
|
||||
@@ -126,12 +126,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType<ArgonAccuracyCounter>().Any(counter => counter.Position != new Vector2()));
|
||||
AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType<ArgonAccuracyCounter>().First().CreateSerialisedInfo()));
|
||||
AddStep("add any component", () => Game.ChildrenOfType<SkinComponentToolbox.ToolboxComponentButton>().First().TriggerClick());
|
||||
AddStep("undo", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
InputManager.Key(Key.Z);
|
||||
InputManager.ReleaseKey(Key.ControlLeft);
|
||||
});
|
||||
AddStep("undo", () => InputManager.Keys(PlatformAction.Undo));
|
||||
AddUntilStep("only one accuracy meter left",
|
||||
() => Game.ChildrenOfType<Player>().Single().ChildrenOfType<ArgonAccuracyCounter>().Count(),
|
||||
() => Is.EqualTo(1));
|
||||
@@ -163,12 +158,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
AddUntilStep("wait for accuracy counter", () => Game.ChildrenOfType<ArgonAccuracyCounter>().Any(counter => counter.Position != new Vector2()));
|
||||
AddStep("dump state of accuracy meter", () => state = JsonConvert.SerializeObject(Game.ChildrenOfType<ArgonAccuracyCounter>().First().CreateSerialisedInfo()));
|
||||
AddStep("add any component", () => Game.ChildrenOfType<SkinComponentToolbox.ToolboxComponentButton>().First().TriggerClick());
|
||||
AddStep("undo", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
InputManager.Key(Key.Z);
|
||||
InputManager.ReleaseKey(Key.ControlLeft);
|
||||
});
|
||||
AddStep("undo", () => InputManager.Keys(PlatformAction.Undo));
|
||||
AddUntilStep("only one accuracy meter left",
|
||||
() => Game.ChildrenOfType<Player>().Single().ChildrenOfType<ArgonAccuracyCounter>().Count(),
|
||||
() => Is.EqualTo(1));
|
||||
@@ -190,12 +180,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
|
||||
AddUntilStep("wait for components", () => skinEditor.ChildrenOfType<SkinBlueprint>().Any());
|
||||
|
||||
AddStep("select all components", () =>
|
||||
{
|
||||
InputManager.PressKey(Key.ControlLeft);
|
||||
InputManager.Key(Key.A);
|
||||
InputManager.ReleaseKey(Key.ControlLeft);
|
||||
});
|
||||
AddStep("select all components", () => InputManager.Keys(PlatformAction.SelectAll));
|
||||
|
||||
AddUntilStep("components selected", () => skinEditor.SelectedComponents.Count > 0);
|
||||
|
||||
|
||||
@@ -188,6 +188,13 @@ namespace osu.Game.Online.Leaderboards
|
||||
var newScoresArray = newScores.ToArray();
|
||||
scores.Value = LeaderboardScores.Success(newScoresArray, newScoresArray.Length, null);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
localScoreSubscription?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public record LeaderboardCriteria(
|
||||
|
||||
@@ -41,12 +41,12 @@ namespace osu.Game.Screens.Ranking
|
||||
{
|
||||
Debug.Assert(Score != null);
|
||||
|
||||
// sort mode intentionally omitted to default to score - results screen only supports sorting by score, so don't pass any other to avoid confusion
|
||||
var criteria = new LeaderboardCriteria(
|
||||
Score.BeatmapInfo!,
|
||||
Score.Ruleset,
|
||||
leaderboardManager.CurrentCriteria?.Scope ?? BeatmapLeaderboardScope.Global,
|
||||
leaderboardManager.CurrentCriteria?.ExactMods,
|
||||
leaderboardManager.CurrentCriteria?.Sorting ?? LeaderboardSortMode.Score
|
||||
leaderboardManager.CurrentCriteria?.ExactMods
|
||||
);
|
||||
var requestTaskSource = new TaskCompletionSource<LeaderboardScores>();
|
||||
globalScores.BindValueChanged(_ =>
|
||||
|
||||
@@ -97,5 +97,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
contentContainer.Add(currentContent);
|
||||
currentContent.Show();
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
if (currentContent is BeatmapLeaderboardWedge leaderboardWedge)
|
||||
leaderboardWedge.RefetchScores();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,14 +189,14 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Scope.BindValueChanged(_ => refetchScores());
|
||||
Sorting.BindValueChanged(_ => refetchScores());
|
||||
FilterBySelectedMods.BindValueChanged(_ => refetchScores());
|
||||
beatmap.BindValueChanged(_ => refetchScores());
|
||||
ruleset.BindValueChanged(_ => refetchScores());
|
||||
Scope.BindValueChanged(_ => RefetchScores());
|
||||
Sorting.BindValueChanged(_ => RefetchScores());
|
||||
FilterBySelectedMods.BindValueChanged(_ => RefetchScores());
|
||||
beatmap.BindValueChanged(_ => RefetchScores());
|
||||
ruleset.BindValueChanged(_ => RefetchScores());
|
||||
mods.BindValueChanged(_ => refetchScoresFromMods());
|
||||
|
||||
refetchScores();
|
||||
RefetchScores();
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
@@ -212,14 +212,14 @@ namespace osu.Game.Screens.SelectV2
|
||||
private void refetchScoresFromMods()
|
||||
{
|
||||
if (FilterBySelectedMods.Value)
|
||||
refetchScores();
|
||||
RefetchScores();
|
||||
}
|
||||
|
||||
private bool initialFetchComplete;
|
||||
|
||||
private ScheduledDelegate? refetchOperation;
|
||||
|
||||
private void refetchScores()
|
||||
public void RefetchScores()
|
||||
{
|
||||
SetScores(Array.Empty<ScoreInfo>());
|
||||
|
||||
@@ -477,7 +477,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
case LeaderboardState.NetworkFailure:
|
||||
return new ClickablePlaceholder(LeaderboardStrings.CouldntFetchScores, FontAwesome.Solid.Sync)
|
||||
{
|
||||
Action = refetchScores
|
||||
Action = RefetchScores
|
||||
};
|
||||
|
||||
case LeaderboardState.NoneSelected:
|
||||
|
||||
@@ -594,6 +594,8 @@ namespace osu.Game.Screens.SelectV2
|
||||
|
||||
ensureGlobalBeatmapValid();
|
||||
|
||||
detailsArea.Refresh();
|
||||
|
||||
if (ControlGlobalMusic)
|
||||
{
|
||||
// restart playback on returning to song select, regardless.
|
||||
|
||||
Reference in New Issue
Block a user