mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52:57 +08:00
Merge branch 'master' into disable-intro-track-pause
This commit is contained in:
commit
5337d999b5
@ -799,11 +799,7 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
AddStep("attempt exit", () =>
|
AddRepeatStep("attempt force exit", () => Game.ScreenStack.CurrentScreen.Exit(), 2);
|
||||||
{
|
|
||||||
for (int i = 0; i < 2; ++i)
|
|
||||||
Game.ScreenStack.CurrentScreen.Exit();
|
|
||||||
});
|
|
||||||
AddUntilStep("stopped at exit confirm", () => Game.ChildrenOfType<DialogOverlay>().Single().CurrentDialog is ConfirmExitDialog);
|
AddUntilStep("stopped at exit confirm", () => Game.ChildrenOfType<DialogOverlay>().Single().CurrentDialog is ConfirmExitDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,15 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void RefetchScores() => Scheduler.AddOnce(refetchScores);
|
public void RefetchScores() => Scheduler.AddOnce(refetchScores);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clear all scores from the display.
|
||||||
|
/// </summary>
|
||||||
|
public void ClearScores()
|
||||||
|
{
|
||||||
|
cancelPendingWork();
|
||||||
|
SetScores(null);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Call when a retrieval or display failure happened to show a relevant message to the user.
|
/// Call when a retrieval or display failure happened to show a relevant message to the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -220,9 +229,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
{
|
{
|
||||||
Debug.Assert(ThreadSafety.IsUpdateThread);
|
Debug.Assert(ThreadSafety.IsUpdateThread);
|
||||||
|
|
||||||
cancelPendingWork();
|
ClearScores();
|
||||||
|
|
||||||
SetScores(null);
|
|
||||||
setState(LeaderboardState.Retrieving);
|
setState(LeaderboardState.Retrieving);
|
||||||
|
|
||||||
currentFetchCancellationSource = new CancellationTokenSource();
|
currentFetchCancellationSource = new CancellationTokenSource();
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
private readonly Vector2 ringMinifiedSize = new Vector2(20f);
|
private readonly Vector2 ringMinifiedSize = new Vector2(20f);
|
||||||
|
|
||||||
private readonly Box flashLayer;
|
private readonly Box flashLayer;
|
||||||
private Sample flashSample = null!;
|
private Sample? flashSample;
|
||||||
|
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
private readonly Container ring;
|
private readonly Container ring;
|
||||||
@ -267,7 +267,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
flashLayer.FadeInFromZero(80, Easing.OutQuint)
|
flashLayer.FadeInFromZero(80, Easing.OutQuint)
|
||||||
.Then()
|
.Then()
|
||||||
.FadeOutFromOne(1500, Easing.OutQuint);
|
.FadeOutFromOne(1500, Easing.OutQuint);
|
||||||
flashSample.Play();
|
flashSample?.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(KeyDownEvent e)
|
protected override bool OnKeyDown(KeyDownEvent e)
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -25,6 +26,7 @@ using osu.Game.Input.Bindings;
|
|||||||
using osu.Game.IO;
|
using osu.Game.IO;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.Dialog;
|
||||||
using osu.Game.Overlays.SkinEditor;
|
using osu.Game.Overlays.SkinEditor;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
@ -392,7 +394,12 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (requiresConfirmation)
|
if (requiresConfirmation)
|
||||||
{
|
{
|
||||||
if (dialogOverlay.CurrentDialog is ConfirmExitDialog exitDialog)
|
if (dialogOverlay.CurrentDialog is ConfirmExitDialog exitDialog)
|
||||||
exitDialog.PerformOkAction();
|
{
|
||||||
|
if (exitDialog.Buttons.OfType<PopupDialogOkButton>().FirstOrDefault() != null)
|
||||||
|
exitDialog.PerformOkAction();
|
||||||
|
else
|
||||||
|
exitDialog.Flash();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dialogOverlay.Push(new ConfirmExitDialog(() =>
|
dialogOverlay.Push(new ConfirmExitDialog(() =>
|
||||||
|
@ -37,7 +37,6 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Width = 0.5f,
|
|
||||||
StatisticsUpdate = { BindTarget = StatisticsUpdate }
|
StatisticsUpdate = { BindTarget = StatisticsUpdate }
|
||||||
})).ToArray();
|
})).ToArray();
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,14 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnSuspending(ScreenTransitionEvent e)
|
||||||
|
{
|
||||||
|
// Scores will be refreshed on arriving at this screen.
|
||||||
|
// Clear them to avoid animation overload on returning to song select.
|
||||||
|
playBeatmapDetailArea.Leaderboard.ClearScores();
|
||||||
|
base.OnSuspending(e);
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnResuming(ScreenTransitionEvent e)
|
public override void OnResuming(ScreenTransitionEvent e)
|
||||||
{
|
{
|
||||||
base.OnResuming(e);
|
base.OnResuming(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user