Use the font dictionary everywhere

This commit is contained in:
Paul Chote
2011-05-16 17:59:30 +12:00
parent e1c8658fdc
commit d7f009b218
17 changed files with 45 additions and 55 deletions

View File

@@ -39,10 +39,10 @@ namespace OpenRA.Widgets
if (composing)
{
var text = teamChat ? "Chat (Team): " : "Chat (All): ";
var w = Game.Renderer.BoldFont.Measure(text).X;
var w = Game.Renderer.Fonts["Bold"].Measure(text).X;
Game.Renderer.BoldFont.DrawTextWithContrast(text, RenderOrigin + new float2(3, 7), Color.White, Color.Black, UseContrast ? 1 : 0);
Game.Renderer.RegularFont.DrawTextWithContrast(content, RenderOrigin + new float2(3 + w, 7), Color.White, Color.Black, UseContrast ? 1 : 0);
Game.Renderer.Fonts["Bold"].DrawTextWithContrast(text, RenderOrigin + new float2(3, 7), Color.White, Color.Black, UseContrast ? 1 : 0);
Game.Renderer.Fonts["Regular"].DrawTextWithContrast(content, RenderOrigin + new float2(3 + w, 7), Color.White, Color.Black, UseContrast ? 1 : 0);
}
}