Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -107,7 +107,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
checkbox.IsChecked = () => optionValue.Update(orderManager.LobbyInfo.GlobalSettings).IsEnabled;
checkbox.IsDisabled = () => configurationDisabled() || optionValue.Update(orderManager.LobbyInfo.GlobalSettings).IsLocked;
checkbox.OnClick = () => orderManager.IssueOrder(Order.Command(
"option {0} {1}".F(option.Id, !optionValue.Update(orderManager.LobbyInfo.GlobalSettings).IsEnabled)));
$"option {option.Id} {!optionValue.Update(orderManager.LobbyInfo.GlobalSettings).IsEnabled}"));
}
foreach (var option in allOptions.Where(o => !(o is LobbyBooleanOption)))
@@ -148,7 +148,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Func<KeyValuePair<string, string>, ScrollItemWidget, ScrollItemWidget> setupItem = (c, template) =>
{
Func<bool> isSelected = () => optionValue.Update(orderManager.LobbyInfo.GlobalSettings).Value == c.Key;
Action onClick = () => orderManager.IssueOrder(Order.Command("option {0} {1}".F(option.Id, c.Key)));
Action onClick = () => orderManager.IssueOrder(Order.Command($"option {option.Id} {c.Key}"));
var item = ScrollItemWidget.Setup(template, isSelected, onClick);
item.Get<LabelWidget>("LABEL").GetText = () => c.Value;