From f52a1c1521ec5a5bd68ef2aed33b88b8f9818cdb Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 24 Jun 2013 19:31:15 +1200 Subject: [PATCH] Round CashTick pos to the nearest int. --- OpenRA.Game/Graphics/TextRenderable.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Graphics/TextRenderable.cs b/OpenRA.Game/Graphics/TextRenderable.cs index cbebceb6cd..aca97cba9f 100644 --- a/OpenRA.Game/Graphics/TextRenderable.cs +++ b/OpenRA.Game/Graphics/TextRenderable.cs @@ -8,6 +8,7 @@ */ #endregion +using System; using System.Collections.Generic; using System.Drawing; @@ -43,8 +44,9 @@ namespace OpenRA.Graphics public void BeforeRender(WorldRenderer wr) {} public void Render(WorldRenderer wr) { - var screenPos = Game.viewport.Zoom*(wr.ScreenPxPosition(pos) - Game.viewport.Location) - 0.5f*font.Measure(text).ToFloat2(); - font.DrawTextWithContrast(text, screenPos, color, Color.Black, 1); + var screenPos = Game.viewport.Zoom*(wr.ScreenPosition(pos) - Game.viewport.Location) - 0.5f*font.Measure(text).ToFloat2(); + var screenPxPos = new float2((float)Math.Round(screenPos.X), (float)Math.Round(screenPos.Y)); + font.DrawTextWithContrast(text, screenPxPos, color, Color.Black, 1); } public void RenderDebugGeometry(WorldRenderer wr)