Skip to content

Commit 1d09b79

Browse files
committed
Added the GetStringFmt() function
1 parent 2eeaf7a commit 1d09b79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,11 +1009,13 @@ void TextPageForceInfo(TableData table)
10091009

10101010
if (train.TrainWindResistanceDependent) // Only show this information if wind resistance is selected
10111011
{
1012-
TableAddLine(table, $"{Viewer.Catalog.GetString("Wind Speed:")} {Me.ToMi(pS.TopH(train.PhysicsWindSpeedMpS)):N2} mph {Viewer.Catalog.GetString("Wind Direction:")} {train.PhysicsWindDirectionDeg:N2} Deg {Viewer.Catalog.GetString("Train Direction:")} {train.PhysicsTrainLocoDirectionDeg:N2} Deg {Viewer.Catalog.GetString("ResWind:")} {train.ResultantWindComponentDeg:N2} Deg {Viewer.Catalog.GetString("ResSpeed:")} {Me.ToMi(pS.TopH(train.WindResultantSpeedMpS)):N2} mph");
1012+
TableAddLine(table, $"{Viewer.Catalog.GetString("Wind Speed:")} {Viewer.Catalog.GetStringFmt("{0:N2} mph", Me.ToMi(pS.TopH(train.PhysicsWindSpeedMpS)))} " +
1013+
$"{Viewer.Catalog.GetString("Wind Direction:")} {Viewer.Catalog.GetStringFmt("{0:N2} Deg", train.PhysicsWindDirectionDeg)} " +
1014+
$"{Viewer.Catalog.GetString("Train Direction:")} {Viewer.Catalog.GetStringFmt("{0:N2} Deg", train.PhysicsTrainLocoDirectionDeg)} " +
1015+
$"{Viewer.Catalog.GetString("ResWind:")} {Viewer.Catalog.GetStringFmt("{0:N2} Deg", train.ResultantWindComponentDeg)} " +
1016+
$"{Viewer.Catalog.GetString("ResSpeed:")} {Viewer.Catalog.GetStringFmt("{0:N2} mph", Me.ToMi(pS.TopH(train.WindResultantSpeedMpS)))}");
10131017
TableAddLine(table);
10141018
}
1015-
1016-
10171019
}
10181020

10191021
TableSetCells(table, 0,

0 commit comments

Comments
 (0)