mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Share hover sound debounce across all instances via SessionStatics
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
@ -14,6 +16,7 @@ namespace osu.Game.Configuration
|
||||
{
|
||||
Set(Static.LoginOverlayDisplayed, false);
|
||||
Set(Static.MutedAudioNotificationShownOnce, false);
|
||||
Set(Static.LastHoverSoundPlaybackTime, 0.0);
|
||||
Set<APISeasonalBackgrounds>(Static.SeasonalBackgrounds, null);
|
||||
}
|
||||
}
|
||||
@ -28,5 +31,11 @@ namespace osu.Game.Configuration
|
||||
/// Value under this lookup can be <c>null</c> if there are no backgrounds available (or API is not reachable).
|
||||
/// </summary>
|
||||
SeasonalBackgrounds,
|
||||
|
||||
/// <summary>
|
||||
/// The last playback time in milliseconds of a hover sample (from <see cref="HoverSounds"/>).
|
||||
/// Used to debounce hover sounds game-wide to avoid volume saturation, especially in scrolling views with many UI controls like <see cref="SettingsOverlay"/>.
|
||||
/// </summary>
|
||||
LastHoverSoundPlaybackTime
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user