mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 17:23:57 +08:00
Better document various debounce constants and split out processing debounce for clarity
This commit is contained in:
@@ -249,7 +249,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
mapperText.Text = beatmap.Value.Metadata.Author.Username;
|
||||
}
|
||||
|
||||
starRatingDisplay.Current = (Bindable<StarDifficulty>)difficultyCache.GetBindableDifficulty(beatmap.Value.BeatmapInfo, cancellationSource.Token, SongSelect.SELECTION_DEBOUNCE);
|
||||
starRatingDisplay.Current = (Bindable<StarDifficulty>)difficultyCache.GetBindableDifficulty(beatmap.Value.BeatmapInfo, cancellationSource.Token, SongSelect.DIFFICULTY_CALCULATION_DEBOUNCE);
|
||||
|
||||
updateCountStatistics(cancellationSource.Token);
|
||||
updateDifficultyStatistics();
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
|
||||
var beatmap = (BeatmapInfo)Item.Model;
|
||||
|
||||
starDifficultyBindable = difficultyCache.GetBindableDifficulty(beatmap, starDifficultyCancellationSource.Token, SongSelect.SELECTION_DEBOUNCE);
|
||||
starDifficultyBindable = difficultyCache.GetBindableDifficulty(beatmap, starDifficultyCancellationSource.Token, SongSelect.DIFFICULTY_CALCULATION_DEBOUNCE);
|
||||
starDifficultyBindable.BindValueChanged(starDifficulty =>
|
||||
{
|
||||
starRatingDisplay.Current.Value = starDifficulty.NewValue;
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
|
||||
var beatmap = (BeatmapInfo)Item.Model;
|
||||
|
||||
starDifficultyBindable = difficultyCache.GetBindableDifficulty(beatmap, starDifficultyCancellationSource.Token, SongSelect.SELECTION_DEBOUNCE);
|
||||
starDifficultyBindable = difficultyCache.GetBindableDifficulty(beatmap, starDifficultyCancellationSource.Token, SongSelect.DIFFICULTY_CALCULATION_DEBOUNCE);
|
||||
starDifficultyBindable.BindValueChanged(starDifficulty =>
|
||||
{
|
||||
starRatingDisplay.Current.Value = starDifficulty.NewValue;
|
||||
|
||||
@@ -63,10 +63,21 @@ namespace osu.Game.Screens.SelectV2
|
||||
[Cached(typeof(ISongSelect))]
|
||||
public abstract partial class SongSelect : ScreenWithBeatmapBackground, IKeyBindingHandler<GlobalAction>, ISongSelect
|
||||
{
|
||||
// this is intentionally slightly higher than key repeat, but low enough to not impede user experience.
|
||||
// this avoids rapid churn loading when iterating the carousel using keyboard.
|
||||
/// <summary>
|
||||
/// A debounce that governs how long after a panel is selected before the rest of song select (and the game at large)
|
||||
/// updates to show that selection.
|
||||
///
|
||||
/// This is intentionally slightly higher than key repeat, but low enough to not impede user experience.
|
||||
/// </summary>
|
||||
public const int SELECTION_DEBOUNCE = 150;
|
||||
|
||||
/// <summary>
|
||||
/// A general "global" debounce to be applied to anything aggressive difficulty calculation at song select,
|
||||
/// either after selection or after a panel comes on screen. Value should be low enough that users don't complain,
|
||||
/// but otherwise as high as possible to reduce overheads.
|
||||
/// </summary>
|
||||
public const int DIFFICULTY_CALCULATION_DEBOUNCE = 150;
|
||||
|
||||
private const float logo_scale = 0.4f;
|
||||
private const double fade_duration = 300;
|
||||
|
||||
@@ -1035,6 +1046,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
return;
|
||||
|
||||
onlineLookupCancellation?.Cancel();
|
||||
onlineLookupCancellation = null;
|
||||
|
||||
if (beatmapSetInfo.OnlineID < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user