Draw editor selection box using the UI renderers.

This commit is contained in:
Paul Chote
2019-12-07 11:36:27 +00:00
committed by teinarss
parent 2918ecadaa
commit 630ca0aefb
2 changed files with 19 additions and 2 deletions

View File

@@ -112,12 +112,18 @@ namespace OpenRA.Mods.Common.Traits
var highlight = worldRenderer.Palette("highlight");
var overlay = items.Where(r => !r.IsDecoration)
.Select(r => r.WithPalette(highlight));
return items.Concat(overlay).Append(SelectionBox);
return items.Concat(overlay);
}
return items;
}
public IEnumerable<IRenderable> RenderAnnotations()
{
if (Selected)
yield return SelectionBox;
}
public void ReplaceInit<T>(T init)
{
var original = Actor.InitDict.GetOrDefault<T>();