Modified actor tooltips to include friendly name and internal name

This commit is contained in:
Dmitri Suvorov
2015-06-28 14:16:37 +03:00
parent e4f3a17477
commit 1fb03ad656
2 changed files with 6 additions and 3 deletions

View File

@@ -135,7 +135,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
item.Bounds.Width = preview.Bounds.Width + 2 * preview.Bounds.X;
item.Bounds.Height = preview.Bounds.Height + 2 * preview.Bounds.Y;
item.IsVisible = () => true;
item.GetTooltipText = () => actor.Name;
var tooltip = actor.Traits.GetOrDefault<TooltipInfo>();
item.GetTooltipText = () => tooltip == null ? actor.Name : tooltip.Name + " (" + actor.Name + ")";
panel.AddChild(item);
}
catch