Draw annotations using the UI renderers.

This commit is contained in:
Paul Chote
2019-09-15 12:20:08 +01:00
committed by abcdefg30
parent 8c1b0f1afe
commit e772adb0a9
13 changed files with 108 additions and 112 deletions

View File

@@ -52,7 +52,10 @@ namespace OpenRA.Mods.Common.Graphics
public IFinalizedRenderable PrepareRender(WorldRenderer wr) { return this; }
public void Render(WorldRenderer wr)
{
Game.Renderer.WorldRgbaColorRenderer.DrawLine(wr.Screen3DPosition(start), wr.Screen3DPosition(end), width / wr.Viewport.Zoom, startColor, endColor);
Game.Renderer.RgbaColorRenderer.DrawLine(
wr.Viewport.WorldToViewPx(wr.ScreenPosition(start)),
wr.Viewport.WorldToViewPx(wr.Screen3DPosition(end)),
width, startColor, endColor);
}
public void RenderDebugGeometry(WorldRenderer wr) { }