1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 19:22:56 +08:00

Adjust rounding in mod select difficulty multiplier to match song select footer

The 0.01 `Precision` spec on `DifficultyMultiplierDisplay.Current` would
cause the difficulty multiplier to use a different midpoint rounding
strategy than `double.ToString()`, which is the one that the song select
footer relies on. For example, a value of 0.015 would be rounded down
to 0.01 by `double.ToString()`, but rounded up to 0.02
by `BindableDouble`.

Fix the discrepancy by just deleting the `Precision` spec. Since the
value of the bindable would go through `ToLocalisableString(@"N2")`
anyway, it was redundant as is.

Fixes #19889.
This commit is contained in:
Bartłomiej Dach 2022-08-21 23:07:42 +02:00
parent 513ba69f6f
commit aa15e84bea
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -31,10 +31,7 @@ namespace osu.Game.Overlays.Mods
set => current.Current = value;
}
private readonly BindableNumberWithCurrent<double> current = new BindableNumberWithCurrent<double>(1)
{
Precision = 0.01
};
private readonly BindableNumberWithCurrent<double> current = new BindableNumberWithCurrent<double>(1);
private readonly Box underlayBackground;
private readonly Box contentBackground;