diff --git a/Content.Client/UserInterface/RoundEndSummaryWindow.cs b/Content.Client/UserInterface/RoundEndSummaryWindow.cs index 5f2d736d9c..550c48032f 100644 --- a/Content.Client/UserInterface/RoundEndSummaryWindow.cs +++ b/Content.Client/UserInterface/RoundEndSummaryWindow.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Content.Client.Utility; +using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Localization; @@ -17,7 +18,7 @@ namespace Content.Client.UserInterface private TabContainer RoundEndWindowTabs { get; } protected override Vector2? CustomSize => (520, 580); - public RoundEndSummaryWindow(string gm, TimeSpan roundTimeSpan, List info ) + public RoundEndSummaryWindow(string gm, TimeSpan roundTimeSpan, List info) { Title = Loc.GetString("Round End Summary"); @@ -65,30 +66,40 @@ namespace Content.Client.UserInterface //Create labels for each player info. foreach (var plyinfo in manifestSortedList) { - var playerInfoText = new RichTextLabel() { - SizeFlagsVertical = SizeFlags.Fill + SizeFlagsVertical = SizeFlags.Fill, }; //TODO: On Hover display a popup detailing more play info. //For example: their antag goals and if they completed them sucessfully. var icNameColor = plyinfo.Antag ? "red" : "white"; playerInfoText.SetMarkup( - Loc.GetString($"[color=gray]{plyinfo.PlayerOOCName}[/color] was [color={icNameColor}]{plyinfo.PlayerICName}[/color] playing role of [color=orange]{plyinfo.Role}[/color].")); + Loc.GetString("[color=gray]{0}[/color] was [color={1}]{2}[/color] playing role of [color=orange]{3}[/color].", + plyinfo.PlayerOOCName, icNameColor, plyinfo.PlayerICName, Loc.GetString(plyinfo.Role))); innerScrollContainer.AddChild(playerInfoText); } scrollContainer.AddChild(innerScrollContainer); //Attach the entire ScrollContainer that holds all the playerinfo. PlayerManifestoTab.AddChild(scrollContainer); + // TODO: 1240 Overlap, remove once it's fixed. Temp Hack to make the lines not overlap + PlayerManifestoTab.OnVisibilityChanged += PlayerManifestoTab_OnVisibilityChanged; //Finally, display the window. OpenCentered(); MoveToFront(); - } + private void PlayerManifestoTab_OnVisibilityChanged(Control obj) + { + if (obj.Visible) + { + // For some reason the lines get not properly drawn with the right height + // so we just force a update + ForceRunLayoutUpdate(); + } + } } }