TimeWidget does not collide anymore with koth layout.

Screen resolution should be 1024x786+
This commit is contained in:
Remco van der Zon
2012-06-06 10:47:13 +02:00
parent ae94d7ecc7
commit 8f981977e0

View File

@@ -19,15 +19,9 @@ namespace OpenRA.Widgets
var font = Game.Renderer.Fonts["Title"]; var font = Game.Renderer.Fonts["Title"];
var rb = RenderBounds; var rb = RenderBounds;
var s = WidgetUtils.FormatTime(Game.LocalTick); var s = WidgetUtils.FormatTime(Game.LocalTick) + (Game.orderManager.GamePaused?" (paused)":"");
var pos = new float2(rb.Left - font.Measure(s).X / 2, rb.Top); var pos = new float2(rb.Left - font.Measure(s).X / 2, rb.Top);
var s_paused = (Game.orderManager.GamePaused ? "\n (paused)" : "");
var pos_paused = new float2(rb.Left - font.Measure(s_paused).X / 2, rb.Top+1);
font.DrawTextWithContrast(s, pos, Color.White, Color.Black, 1); font.DrawTextWithContrast(s, pos, Color.White, Color.Black, 1);
font.DrawTextWithContrast(s_paused, pos_paused, Color.White, Color.Black, 1);
} }
} }
} }