1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-13 20:33:35 +08:00
Files
osu-lazer/osu.Game.Tests
T
Bartłomiej Dach 7f5f368dea Fix some numeric settings not working correct in some languages when attempting to set negative value (#37667)
Closes https://github.com/ppy/osu/issues/37553.

You can probably tell by the title that this is going to be a good one.

As previously mentioned in https://github.com/ppy/osu/pull/35395,
framework-side `TextBox` uses a bunch of `NumberFormat` properties from
`CurrentCulture` to contextually allow decimal points or minus signs in
a textbox.

In some languages, namely (of the ones we support): Finnish, Croatian,
Lithuanian, Norsk, Slovenian, and Swedish, `NumberFormat.NegativeSign`
is not `U+002D HYPHEN MINUS`, but instead `U+2212 MINUS SIGN`.
Therefore, in `FormSliderBar`, when `ToStandardFormattedString()` is
attempted to be used to set the textbox value, the hardcoded `U+002D
HYPHEN MINUS` is rejected on cultures that expect `U+2212 MINUS SIGN`,
and thus due to a feedback loop, all negative values are no longer
settable.

This applies the obvious fix of applying `NumberFormat.NegativeSign`.
7f5f368dea · 2026-05-08 15:45:57 +09:00
History
..
2026-03-17 03:58:02 +09:00
2023-06-24 01:00:03 +09:00
2026-03-17 03:58:02 +09:00
2026-03-19 00:05:52 +09:00
2026-04-17 17:06:24 +09:00
2026-03-17 03:58:02 +09:00
2025-03-18 16:24:01 +09:00
2026-03-17 03:58:02 +09:00
2026-03-17 03:58:02 +09:00
2023-05-02 11:55:05 +03:00
2026-03-17 03:58:02 +09:00
2026-03-17 03:58:02 +09:00