Truncate player name in replay browser.
This commit is contained in:
@@ -639,7 +639,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var item = ScrollItemWidget.Setup(playerTemplate, () => false, () => { });
|
||||
|
||||
var label = item.Get<LabelWidget>("LABEL");
|
||||
label.GetText = () => o.Name;
|
||||
var font = Game.Renderer.Fonts[label.Font];
|
||||
var name = WidgetUtils.TruncateText(o.Name, label.Bounds.Width, font);
|
||||
label.GetText = () => name;
|
||||
label.GetColor = () => color;
|
||||
|
||||
var flag = item.Get<ImageWidget>("FLAG");
|
||||
|
||||
@@ -273,7 +273,7 @@ Container@REPLAYBROWSER_PANEL:
|
||||
Height: 16
|
||||
Label@LABEL:
|
||||
X: 40
|
||||
Width: 60
|
||||
Width: PARENT_RIGHT-50
|
||||
Height: 25
|
||||
Label@NOFLAG_LABEL:
|
||||
X: 5
|
||||
|
||||
@@ -262,7 +262,7 @@ Background@REPLAYBROWSER_PANEL:
|
||||
Height: 16
|
||||
Label@LABEL:
|
||||
X: 40
|
||||
Width: 60
|
||||
Width: PARENT_RIGHT-50
|
||||
Height: 25
|
||||
Label@NOFLAG_LABEL:
|
||||
X: 5
|
||||
|
||||
Reference in New Issue
Block a user