Modified actor tooltips to include friendly name and internal name
This commit is contained in:
@@ -69,8 +69,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Footprint = new ReadOnlyDictionary<CPos, SubCell>(footprint);
|
||||
}
|
||||
|
||||
var tooltipInfo = Info.Traits.GetOrDefault<ITooltipInfo>();
|
||||
Tooltip = "{0} ({1})".F(tooltipInfo != null ? tooltipInfo.TooltipForPlayerStance(Stance.None) : Info.Name, ID);
|
||||
var tooltip = Info.Traits.GetOrDefault<TooltipInfo>();
|
||||
Tooltip = tooltip == null ? Info.Name + " - " + ID : tooltip.Name + " (" + Info.Name + ") - " + ID;
|
||||
|
||||
GeneratePreviews();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user