Rename RangeCircleRenderable to RangeCircleAnnotationRenderable.
This commit is contained in:
@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
wcr.DrawLine(center, end, 1, Color.FromArgb(alpha, color));
|
||||
}
|
||||
|
||||
RangeCircleRenderable.DrawRangeCircle(wr, centerPosition, radius, 1, color, 3, contrastColor);
|
||||
RangeCircleAnnotationRenderable.DrawRangeCircle(wr, centerPosition, radius, 1, color, 3, contrastColor);
|
||||
}
|
||||
|
||||
public void RenderDebugGeometry(WorldRenderer wr) { }
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.Primitives;
|
||||
|
||||
namespace OpenRA.Mods.Common.Graphics
|
||||
{
|
||||
public struct RangeCircleRenderable : IRenderable, IFinalizedRenderable
|
||||
public struct RangeCircleAnnotationRenderable : IRenderable, IFinalizedRenderable
|
||||
{
|
||||
const int RangeCircleSegments = 32;
|
||||
static readonly Int32Matrix4x4[] RangeCircleStartRotations = Exts.MakeArray(RangeCircleSegments, i => WRot.FromFacing(8 * i).AsMatrix());
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
readonly Color color;
|
||||
readonly Color contrastColor;
|
||||
|
||||
public RangeCircleRenderable(WPos centerPosition, WDist radius, int zOffset, Color color, Color contrastColor)
|
||||
public RangeCircleAnnotationRenderable(WPos centerPosition, WDist radius, int zOffset, Color color, Color contrastColor)
|
||||
{
|
||||
this.centerPosition = centerPosition;
|
||||
this.radius = radius;
|
||||
@@ -40,9 +40,9 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
public int ZOffset { get { return zOffset; } }
|
||||
public bool IsDecoration { get { return true; } }
|
||||
|
||||
public IRenderable WithPalette(PaletteReference newPalette) { return new RangeCircleRenderable(centerPosition, radius, zOffset, color, contrastColor); }
|
||||
public IRenderable WithZOffset(int newOffset) { return new RangeCircleRenderable(centerPosition, radius, newOffset, color, contrastColor); }
|
||||
public IRenderable OffsetBy(WVec vec) { return new RangeCircleRenderable(centerPosition + vec, radius, zOffset, color, contrastColor); }
|
||||
public IRenderable WithPalette(PaletteReference newPalette) { return new RangeCircleAnnotationRenderable(centerPosition, radius, zOffset, color, contrastColor); }
|
||||
public IRenderable WithZOffset(int newOffset) { return new RangeCircleAnnotationRenderable(centerPosition, radius, newOffset, color, contrastColor); }
|
||||
public IRenderable OffsetBy(WVec vec) { return new RangeCircleAnnotationRenderable(centerPosition + vec, radius, zOffset, color, contrastColor); }
|
||||
public IRenderable AsDecoration() { return this; }
|
||||
|
||||
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
|
||||
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!ValidRenderPlayer())
|
||||
yield break;
|
||||
|
||||
yield return new RangeCircleRenderable(
|
||||
yield return new RangeCircleAnnotationRenderable(
|
||||
self.CenterPosition,
|
||||
Info.Range,
|
||||
0,
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
if (range == null || range.Value == WDist.Zero)
|
||||
return SpriteRenderable.None;
|
||||
|
||||
var localRange = new RangeCircleRenderable(
|
||||
var localRange = new RangeCircleAnnotationRenderable(
|
||||
centerPosition,
|
||||
range.Value,
|
||||
0,
|
||||
@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
if (range == WDist.Zero)
|
||||
yield break;
|
||||
|
||||
yield return new RangeCircleRenderable(
|
||||
yield return new RangeCircleAnnotationRenderable(
|
||||
self.CenterPosition,
|
||||
range,
|
||||
0,
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
if (EnabledByDefault)
|
||||
{
|
||||
yield return new RangeCircleRenderable(
|
||||
yield return new RangeCircleAnnotationRenderable(
|
||||
centerPosition,
|
||||
Range,
|
||||
0,
|
||||
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
public IEnumerable<IRenderable> RenderRangeCircle(Actor self, WorldRenderer wr, RangeCircleVisibility visibility)
|
||||
{
|
||||
if (Info.Visible == visibility && Visible)
|
||||
yield return new RangeCircleRenderable(
|
||||
yield return new RangeCircleAnnotationRenderable(
|
||||
self.CenterPosition,
|
||||
Info.Range,
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user