1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Make DuckDuration non-zero by default

This commit is contained in:
Dean Herbert 2024-07-05 18:38:24 +09:00
parent 7efb4ce30a
commit 5907e0d1eb
No known key found for this signature in database
5 changed files with 6 additions and 9 deletions

View File

@ -13,10 +13,7 @@ namespace osu.Game.Tests.Visual.Menus
[Test]
public void TestMomentaryDuck()
{
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000, new DuckParameters
{
DuckDuration = 300,
}));
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000));
}
[Test]

View File

@ -127,8 +127,8 @@ namespace osu.Game.Collections
{
duckOperation = musicController?.Duck(new DuckParameters
{
DuckDuration = 100,
DuckVolumeTo = 1,
DuckDuration = 100,
RestoreDuration = 100,
});

View File

@ -108,8 +108,8 @@ namespace osu.Game.Overlays
{
duckOperation = musicController?.Duck(new DuckParameters
{
DuckDuration = 100,
DuckVolumeTo = 1,
DuckDuration = 100,
RestoreDuration = 100,
});
}

View File

@ -486,9 +486,9 @@ namespace osu.Game.Overlays
{
/// <summary>
/// The duration of the ducking transition in milliseconds.
/// Defaults to no duration (immediate ducking).
/// Defaults to 100 ms.
/// </summary>
public double DuckDuration = 0;
public double DuckDuration = 100;
/// <summary>
/// The final volume which should be reached during ducking, when 0 is silent and 1 is original volume.

View File

@ -122,7 +122,7 @@ namespace osu.Game.Overlays.Toolbar
rulesetSelectionChannel[r.NewValue] = channel;
channel.Play();
musicController?.DuckMomentarily(500);
musicController?.DuckMomentarily(500, new DuckParameters { DuckDuration = 0 });
}
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;