Fix IDE0032
This commit is contained in:
committed by
Pavel Penev
parent
e64c0a35c5
commit
98c4eaca83
@@ -18,9 +18,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
public class UITextRenderable : IRenderable, IFinalizedRenderable
|
||||
{
|
||||
readonly SpriteFont font;
|
||||
readonly WPos effectiveWorldPos;
|
||||
readonly int2 screenPos;
|
||||
readonly int zOffset;
|
||||
readonly Color color;
|
||||
readonly Color bgDark;
|
||||
readonly Color bgLight;
|
||||
@@ -29,9 +27,9 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
public UITextRenderable(SpriteFont font, WPos effectiveWorldPos, int2 screenPos, int zOffset, Color color, Color bgDark, Color bgLight, string text)
|
||||
{
|
||||
this.font = font;
|
||||
this.effectiveWorldPos = effectiveWorldPos;
|
||||
Pos = effectiveWorldPos;
|
||||
this.screenPos = screenPos;
|
||||
this.zOffset = zOffset;
|
||||
ZOffset = zOffset;
|
||||
this.color = color;
|
||||
this.bgDark = bgDark;
|
||||
this.bgLight = bgLight;
|
||||
@@ -44,12 +42,12 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
ChromeMetrics.Get<Color>("TextContrastColorLight"),
|
||||
text) { }
|
||||
|
||||
public WPos Pos => effectiveWorldPos;
|
||||
public int ZOffset => zOffset;
|
||||
public WPos Pos { get; }
|
||||
public int ZOffset { get; }
|
||||
public bool IsDecoration => true;
|
||||
|
||||
public IRenderable WithZOffset(int newOffset) { return new UITextRenderable(font, effectiveWorldPos, screenPos, zOffset, color, text); }
|
||||
public IRenderable OffsetBy(in WVec vec) { return new UITextRenderable(font, effectiveWorldPos + vec, screenPos, zOffset, color, text); }
|
||||
public IRenderable WithZOffset(int newOffset) { return new UITextRenderable(font, Pos, screenPos, ZOffset, color, text); }
|
||||
public IRenderable OffsetBy(in WVec vec) { return new UITextRenderable(font, Pos + vec, screenPos, ZOffset, color, text); }
|
||||
public IRenderable AsDecoration() { return this; }
|
||||
|
||||
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
|
||||
|
||||
Reference in New Issue
Block a user