Fix lobby faction tooltip rendering.

This commit is contained in:
Paul Chote
2023-10-29 14:20:27 +00:00
committed by Gustas
parent 500ee54f04
commit b28a3b6a5a
3 changed files with 8 additions and 7 deletions

View File

@@ -218,7 +218,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
colorManager = modRules.Actors[SystemActors.World].TraitInfo<IColorPickerManagerInfo>();
foreach (var f in modRules.Actors[SystemActors.World].TraitInfos<FactionInfo>())
factions.Add(f.InternalName, new LobbyFaction { Selectable = f.Selectable, Name = f.Name, Side = f.Side, Description = f.Description });
factions.Add(f.InternalName, new LobbyFaction { Selectable = f.Selectable, Name = f.Name, Side = f.Side, Description = f.Description?.Replace(@"\n", "\n") });
var gameStarting = false;
Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting ||

View File

@@ -200,7 +200,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
/// <summary>Splits a string into two parts on the first instance of a given token.</summary>
static (string First, string Second) SplitOnFirstToken(string input, string token = "\\n")
static (string First, string Second) SplitOnFirstToken(string input, string token = "\n")
{
if (string.IsNullOrEmpty(input))
return (null, null);