Make all range circles fully configurable.
This commit is contained in:
committed by
Paul Chote
parent
214aa64ce3
commit
14fc0254c6
@@ -28,6 +28,15 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
[Desc("Color of the circle")]
|
||||
public readonly Color Color = Color.FromArgb(128, Color.White);
|
||||
|
||||
[Desc("Border width.")]
|
||||
public readonly float Width = 1;
|
||||
|
||||
[Desc("Color of the border.")]
|
||||
public readonly Color BorderColor = Color.FromArgb(96, Color.Black);
|
||||
|
||||
[Desc("Range circle border width.")]
|
||||
public readonly float BorderWidth = 3;
|
||||
|
||||
[Desc("If set, the color of the owning player will be used instead of `Color`.")]
|
||||
public readonly bool UsePlayerColor = false;
|
||||
|
||||
@@ -50,7 +59,9 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
Range,
|
||||
0,
|
||||
Color,
|
||||
Color.FromArgb(96, Color.Black));
|
||||
Width,
|
||||
BorderColor,
|
||||
BorderWidth);
|
||||
|
||||
foreach (var a in w.ActorsWithTrait<WithRangeCircle>())
|
||||
if (a.Trait.Info.Type == Type)
|
||||
@@ -92,7 +103,9 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
Info.Range,
|
||||
0,
|
||||
Info.UsePlayerColor ? self.Owner.Color : Info.Color,
|
||||
Color.FromArgb(96, Color.Black));
|
||||
Info.Width,
|
||||
Info.BorderColor,
|
||||
Info.BorderWidth);
|
||||
}
|
||||
|
||||
IEnumerable<IRenderable> IRenderAnnotationsWhenSelected.RenderAnnotations(Actor self, WorldRenderer wr)
|
||||
|
||||
Reference in New Issue
Block a user