add contrast surround to timer & chat which are displayed straight over the world

This commit is contained in:
Chris Forbes
2011-01-08 12:10:29 +13:00
parent 303525a5ba
commit db63724aeb
6 changed files with 30 additions and 6 deletions

View File

@@ -26,8 +26,10 @@ namespace OpenRA.Widgets
public override void DrawInner( WorldRenderer wr )
{
var s = WidgetUtils.FormatTime(Game.LocalTick);
var size = Game.Renderer.TitleFont.Measure(s);
Game.Renderer.TitleFont.DrawText(s, new float2(RenderBounds.Left - size.X / 2, RenderBounds.Top - 20), Color.White);
var size = Game.Renderer.TitleFont.Measure(s);
var pos = new float2(RenderBounds.Left - size.X / 2, RenderBounds.Top - 20);
Game.Renderer.TitleFont.DrawTextWithContrast(s, pos, Color.White, Color.Black, 1);
}
}
}