Don't save floats in settings.yaml using country-specific
decimal separators which can be misunderstood as
group seperators which will put values out-of-range.
This commit is contained in:
Matthias Mailänder
2012-06-28 00:09:34 +02:00
committed by Chris Forbes
parent e0c3c53c00
commit 0d59a4dcd7
2 changed files with 5 additions and 1 deletions

View File

@@ -325,6 +325,10 @@ namespace OpenRA.FileFormats
((int)c.B).Clamp(0, 255)); ((int)c.B).Clamp(0, 255));
} }
// Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
if (t == typeof(float))
return ((float)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(Rectangle)) if (t == typeof(Rectangle))
{ {
var r = (Rectangle)v; var r = (Rectangle)v;

View File

@@ -144,7 +144,7 @@ Background@SETTINGS_MENU:
X:100 X:100
Y:60 Y:60
Width:250 Width:250
Height:20 Height:25
Font:Regular Font:Regular
Text:Extreme Text:Extreme
Container@DISPLAY_PANE: Container@DISPLAY_PANE: