mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Add note about delay parameter
This commit is contained in:
@ -699,13 +699,19 @@ namespace osu.Game.Screens.Play
|
|||||||
/// Queue the results screen for display.
|
/// Queue the results screen for display.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// A final display will only occur once all work is completed in <see cref="PrepareScoreForResultsAsync"/>.
|
/// A final display will only occur once all work is completed in <see cref="PrepareScoreForResultsAsync"/>. This means that even after calling this method, the results screen will never be shown until <see cref="JudgementProcessor.HasCompleted">ScoreProcessor.HasCompleted</see> becomes <see langword="true"/>.
|
||||||
/// This means that even after calling this method, the results screen will never be shown until <see cref="JudgementProcessor.HasCompleted">ScoreProcessor.HasCompleted</see> becomes <see langword="true"/>.
|
///
|
||||||
|
/// Calling this method multiple times will have no effect.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="withDelay">Whether a minimum delay (<see cref="RESULTS_DISPLAY_DELAY"/>) should be added before the screen is displayed.</param>
|
/// <param name="withDelay">Whether a minimum delay (<see cref="RESULTS_DISPLAY_DELAY"/>) should be added before the screen is displayed.</param>
|
||||||
private void progressToResults(bool withDelay)
|
private void progressToResults(bool withDelay)
|
||||||
{
|
{
|
||||||
if (resultsDisplayDelegate != null)
|
if (resultsDisplayDelegate != null)
|
||||||
|
// Note that if progressToResults is called one withDelay=true and then withDelay=false, this no-delay timing will not be
|
||||||
|
// accounted for. shouldn't be a huge concern (a user pressing the skip button after a results progression has already been queued
|
||||||
|
// may take x00 more milliseconds than expected in the very rare edge case).
|
||||||
|
//
|
||||||
|
// If required we can handle this more correctly by rescheduling here.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double delay = withDelay ? RESULTS_DISPLAY_DELAY : 0;
|
double delay = withDelay ? RESULTS_DISPLAY_DELAY : 0;
|
||||||
@ -713,7 +719,7 @@ namespace osu.Game.Screens.Play
|
|||||||
resultsDisplayDelegate = new ScheduledDelegate(() =>
|
resultsDisplayDelegate = new ScheduledDelegate(() =>
|
||||||
{
|
{
|
||||||
if (prepareScoreForDisplayTask?.IsCompleted != true)
|
if (prepareScoreForDisplayTask?.IsCompleted != true)
|
||||||
// if the asynchronous preparation has not completed, keep repeating this delegate.
|
// If the asynchronous preparation has not completed, keep repeating this delegate.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
resultsDisplayDelegate?.Cancel();
|
resultsDisplayDelegate?.Cancel();
|
||||||
|
Reference in New Issue
Block a user